Skip to content

Instantly share code, notes, and snippets.

@zard1989
Created December 4, 2009 12:35
Show Gist options
  • Select an option

  • Save zard1989/249002 to your computer and use it in GitHub Desktop.

Select an option

Save zard1989/249002 to your computer and use it in GitHub Desktop.
#!/usr/bin/gosh
(define (move n from to space)
(cond ((= n 1) (display (string-append "move #1 from " from " to " to "\n")))
(else
(move (- n 1) from space to)
(display (string-append "move #" (number->string n) " from " from " to " to "\n"))
(move (- n 1) space to from))))
(move 3 "A" "B" "C")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment