1 ! Copyright (c) 2012 Anonymous
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: formatting kernel math ;
4 IN: rosetta-code.towers-of-hanoi
6 ! http://rosettacode.org/wiki/Towers_of_Hanoi
8 ! In this task, the goal is to solve the Towers of Hanoi problem
14 :: hanoi ( n from to other -- )
16 n 1 - from other to hanoi
18 n 1 - other to from hanoi
21 ! USAGE: 3 1 3 2 hanoi