Skip to content

Instantly share code, notes, and snippets.

@g000001
Created October 23, 2008 08:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save g000001/18963 to your computer and use it in GitHub Desktop.
Save g000001/18963 to your computer and use it in GitHub Desktop.
(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