ABC problem: Difference between revisions
Content added Content deleted
FordArthur (talk | contribs) (Insitux implementation) |
|||
Line 5,174: | Line 5,174: | ||
SQuAd: true |
SQuAd: true |
||
CONFUSE: true</pre> |
CONFUSE: true</pre> |
||
=={{header|Insitux}}== |
|||
<syntaxhighlight lang="insitux">(function in-block? c (when (let block (find (substr? (upper-case c)) rem-blocks)) (var! rem-blocks remove [block]))) |
|||
(function can-make-word word |
|||
(var rem-blocks ["BO" "XK" "DQ" "CP" "NA" "GT" "RE" "TG" "QD" "FS" "JW" "HU" "VI" "AN" "OB" "ER" "FS" "LY" "PC" "ZM"]) |
|||
(.. and (map in-block? word)))) |
|||
(join ", " (map #(str % " => " (can-make-word %)) ["A" "bark" "Book" "TREAT" "Common" "squaD" "CoNFuSe"])) ; Notice case insensitivity</syntaxhighlight> |
|||
=={{header|JavaScript}}== |
=={{header|JavaScript}}== |