Name: Anonymous 2012-07-23 3:49
JUST POST SOME FUCK ING LISP!!!!
(defun generate-expr (&key fn-list term-list max-depth method)
(if (or (= max-depth 0)
(and (eq method :grow)
(< (random 1.0)
(/ (length term-list) (+ (length term-list) (length fn-list))))))
(nth (random (length term-list)) term-list)
(let* ((fn (nth (random (length fn-list)) fn-list))
(arity (length `(swank-backend:arglist ,fn))))
(cons fn (loop for i from 0 to arity
collect (generate-expr :fn-list fn-list :term-list term-list :max-depth (1- max-depth) :method method))))))