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

Shitty Bugs thread

Name: Anonymous 2009-11-21 17:09

Post here whenever you waste hours of your life on a simple bug, so that others may mock you (and/or learn from your mistakes).

(cons 'let (cons paramlist body)) is not the same as (list 'let paramlist body)

Name: Anonymous 2009-11-21 17:17

I would have never made that mistake, and you could have easily tested it in a REPL.
(cons 'let (cons 'paramlist 'body))
;=> (LET . (PARAMLIST . BODY)) => (LET PARAMLIST . BODY)
(list 'let 'paramlist 'body) => (LET PARAMLIST BODY)
; the first one is not a proper list for it does not end with a NIL, the first can also be written as:
(list* 'let paramlist body) instead of (cons 'let (cons paramlist body))

Learn the difference between LIST and LIST*, it may save your life one day!!!

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