Created
October 23, 2008 08:31
-
-
Save g000001/18963 to your computer and use it in GitHub Desktop.
This file contains 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
(defmacro message-to-poland (obj &optional (mesg nil mesg-sup?) &rest arg) | |
(cond (arg `(,mesg ,obj (message-to-poland ,@arg))) | |
(mesg-sup? `(,mesg ,obj)) | |
('T `,obj))) | |
(set-macro-character #\[ (lambda (stream char) | |
(declare (ignore char)) | |
`(message-to-poland ,@(read-delimited-list #\] stream 'T)))) | |
(set-macro-character #\] (get-macro-character #\) nil)) | |
;; | |
(defun tarai (x y z) | |
(cond ([x > y] | |
(tarai | |
(tarai [x - 1] y z) | |
(tarai [y - 1] z x) | |
(tarai [z - 1] x y) )) | |
(t y) )) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment