Towers of Hanoi: Difference between revisions

m
Standard ML Towers of Hanoi solution
(Added code for Standard ML)
m (Standard ML Towers of Hanoi solution)
Line 3,282:
15: Move disc from B to C</pre>
=={{header|Standard ML}}==
<land StandardML> fun hanoi(0, a, b, c) = [] |
hanoi(n, a, b, c) = hanoi(n-1, a, c, b) @ [(a,b)] @ hanoi(n-1, c, b, a);</lang>
 
=={{header|Swift}}==
{{trans|JavaScript}}