ABC problem: Difference between revisions

Content deleted Content added
Jay (talk | contribs)
→‎{{header|FutureBasic}}: Changed output colors
Phunanon (talk | contribs)
→‎Insitux: improvement
Line 5,126:
=={{header|Insitux}}==
<syntaxhighlight lang="insitux">
(function in-block? c
(var find-idx #(when (let found (find % %1)) (idx %1 found)))
(function in-block? c (when (let block-idx (find-idx (substr? (upper-case c)) rem-blocks)) (var! rem-blocks drop block-idx)))
(var! rem-blocks drop block-idx)))
 
(function can-make-word word
Line 5,133 ⟶ 5,134:
(.. and (map in-block? word)))
 
(join ", " (map #(str % " =-> " (can-make-word %)) ["A" "bark" "Book" "TREAT" "Common" "squaD" "CoNFuSe"])) ; Notice case insensitivity
(map #(str % " => " (can-make-word %)))
 
(join ", "))
</syntaxhighlight>
{{out}}