Langtons Ant by kozima

(defun f(p q a x y)(#0=dotimes'(read)(if #2=(aref a x y)(psetf p(- q)q p)(psetf p q q(- p)))(setf #2#(not #2#)x(+ x p)y(+ y q)))(#0#(x 70)(if(loop for y to 44 thereis #2#)(#0#(y 45(terpri))(format(loop for x to 69 thereis #2#)"~:[ ~;#~]"#2#)))))(f 0 -1(make-array'(70 45))30 22)

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page