Jump to content

Towers of Hanoi: Difference between revisions

Add bruijn
(Add bruijn)
Line 1,567:
<
]</syntaxhighlight>
 
=={{header|Bruijn}}==
{{trans|python}}
<syntaxhighlight lang="bruijn">
:import std/Combinator .
:import std/Number .
:import std/String .
 
hanoi y [[[[=?2 empty go]]]]
go [(4 --3 2 0) ++ str ++ (4 --3 0 1)] ((+6) - 1 - 0)
str "Move " ++ disk ++ " from " ++ source ++ " to " ++ destination ++ "\n"
disk number→string 3
source number→string 2
destination number→string 1
</syntaxhighlight>
 
=={{header|C}}==
55

edits

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