Skip to content

Instantly share code, notes, and snippets.

@lispm
Created September 10, 2012 09:16
Show Gist options
  • Save lispm/3689837 to your computer and use it in GitHub Desktop.
Save lispm/3689837 to your computer and use it in GitHub Desktop.
drawing
; http://stackoverflow.com/questions/12345647/rewrite-this-script-by-designing-an-intepreter-in-racket
(defmacro verti (n &body body)
`(progn
(loop repeat ,n
do ,@body
(terpri))))
(defun hori (n s)
(loop repeat n do (princ s)))
(defun test ()
(verti 3 (hori 9 "X"))
(verti 6
(hori 3 " ")
(hori 3 "X")
(hori 3 " "))
(verti 3 (hori 9 "X")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment