elm-logo can solve the Towers of Hanoi problem
This is another post about elm-logo being able to run an algorithm from Rosetta Code although this post comes a bit late like the previous one since the required features landed quite a while ago. This time, it is the Towers of Hanoi problem.
to move :n :from :to :via
if :n = 0 [stop]
move :n-1 :from :via :to
(print [Move disk from] :from [to] :to)
move :n-1 :via :to :from
end
move 4 "left "middle "right
Open snippet in elm-logo (in elm-logo, click “Run” to run it)