Created
December 4, 2009 12:35
-
-
Save zard1989/249002 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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