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

What's the appeal of LISP

Name: Anonymous 2007-08-31 17:49 ID:eOTcF6wL

Lisp has all the visual appeal of oatmeal with fingernail clippings mixed in.

Name: Anonymous 2007-09-01 1:24 ID:LvwPmJgC

CL-USER> (defun fib (n)
           (labels ((aux (x y n)
                      (if (= n 0) y
                          (aux y (+ x y) (- n 1)))))
             (aux 0 1 n)))
FIB
CL-USER> (fib 6)
13
CL-USER> (lambda (recur x y n)
           (if (= n 0) y
               (funcall recur y (+ x y) (- n 1))))
#<FUNCTION (LAMBDA (RECUR X Y ...)) {11D62D25}>
CL-USER> (lambda (x a b c) (funcall x x a b c))
#<FUNCTION (LAMBDA (X A B ...)) {11D9324D}>
CL-USER> ((lambda (x a b c) (funcall x x a b c))
          (lambda (recur x y n)
           (if (= n 0) y
               (funcall recur recur y (+ x y) (- n 1))))
          0 1
          6)
13


please do not fail so hard in future
>>14

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