Jump to content

ABC problem: Difference between revisions

→‎Insitux: improvement
(→‎{{header|FutureBasic}}: Changed output colors)
(→‎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}}
112

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.