Towers of Hanoi: Difference between revisions

Content added Content deleted
(Add bruijn)
Line 1,567: Line 1,567:
<
<
]</syntaxhighlight>
]</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}}==
=={{header|C}}==