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

Learning LISP

Name: Anonymous 2011-03-03 7:56

I've been making my way through SICP, I've reached a point where I feel I have to start experimenting with a Lisp compiler. I'm on a Mac so I downloaded LispWorks, I'm too lazy to figure out how this IDE works.

Can someone point me in the direction of a simple command line compiler/interpreter that will work with the SICP?

Name: Anonymous 2011-03-03 23:58

>>41
describe-object provides arglist, but to extract it you need something like:

(defun get-description (obj)
  (with-output-to-string (s)
    (describe-object obj s)
    s))

(defun extract-regex (regex string)
  (car (all-matches-as-strings regex string)))

(defun get-function-lambda-list (fun)
  (read-from-string
   (extract-regex
    "\\(.*"
    (extract-regex
     "The function's arguments are: .*"
     (substitute #\Space #\Newline (get-description fun))))))

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