Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Post Lisp Code

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))))))

Name: Anonymous 2012-07-23 5:02

>>5
You have not yet reached Satori. It's only syntaxic trickery. Here is a more honest version, in Common Lisp:
(setf (symbol-function 'list%)
  (lambda (&rest lambda) lambda))

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List