Jump to content

Towers of Hanoi: Difference between revisions

no edit summary
No edit summary
Line 2,094:
Completed in 15 moves
</pre>
 
=={{header|lambdatalk}}==
(Following NewLisp, PicoLisp, Racket, Scheme)
<lang scheme>
{def move
{lambda {:n :from :to :via}
{if {<= :n 0}
then >
else {move {- :n 1} :from :via :to}
move disk from :from to :to {br}
{move {- :n 1} :via :to :from} }}}
-> move
{move 4 1 2 3}
</lang>
 
=={{header|Lasso}}==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.