+(defun turtles () *turtles*)
+
+(defun ask (agent-set fn)
+ (mapcar
+ (lambda (agent)
+ (let
+ ((*myself* *self*)
+ (*self* agent))
+ (funcall fn)))
+ (shuffle agent-set)))
+
+(defun shuffle (agent-set)
+ (let
+ ((copy (copy-list agent-set)))
+ (append
+ (loop for i to (- (length copy) 2)
+ for idx = (+ i (cl-nl.random:next-int (- (length copy) i)))
+ for next = (nth idx copy)
+ do (setf (nth idx copy) (nth i copy))
+ collect next)
+ (last copy))))
+
+(defun fd (n)
+ (when (not (turtle-p *self*)) (error "Gotta call fd in turtle scope, dude"))
+ (setf (turtle-xcor *self*) (+ (turtle-xcor *self*) (sin (* pi (/ (turtle-heading *self*) 180)))))
+ (setf (turtle-ycor *self*) (+ (turtle-ycor *self*) (cos (* pi (/ (turtle-heading *self*) 180))))))
+