Task

Solve the   Towers of Hanoi   problem with recursion.




  [ stack ]                     is rings    (     --> [ )
 
  [ rings share
    depth share -
    8 * times sp
    emit sp emit sp
    say 'move' cr ]             is echomove ( c c -->   )
 
  [ dup rings put
    depth put
    char a char b char c
    [ swap decurse
      rot 2dup echomove
      decurse
      swap rot ]
    3 times drop
    depth release
    rings release ]             is hanoi    (   n --> n )
 
  say 'How to solve a three ring Towers of Hanoi puzzle:' cr cr
  3 hanoi cr