Created
September 10, 2012 09:16
-
-
Save lispm/3689837 to your computer and use it in GitHub Desktop.
drawing
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
; 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