Name: Anonymous 2007-09-13 8:39 ID:t4oAORLz
Hello /prog/,
Put that semen encrusted copy of SICP down, youre about to learn LISP for real!
Lets start with the syntax, In this there are atoms and conses, Thats the only data structure and the only code structure from which everything is composed.
And atom could be:
[m]
A cons has two parts the CAR and CDR, it's written like so:
Theres a special atom you need to remember, NIL also written (), It denotes the end of a list, heres a list of x y and z
There's a shorthand notation for [code][m](z . nil)[/m][/code], which is [code][m](z)[/m][/code], infact
[m][code](x . (y . (z . nil)))[/code][/m]
is also written
[m][code](x y z)[/code][/m]
Put that semen encrusted copy of SICP down, youre about to learn LISP for real!
Lets start with the syntax, In this there are atoms and conses, Thats the only data structure and the only code structure from which everything is composed.
And atom could be:
[m]
foo
bar
foo-bar
foop
|AnyThingYouCan<IMAGEINE>|[/mA cons has two parts the CAR and CDR, it's written like so:
(car . cdr)Theres a special atom you need to remember, NIL also written (), It denotes the end of a list, heres a list of x y and z
(x . (y . (z . nil)))There's a shorthand notation for [code][m](z . nil)[/m][/code], which is [code][m](z)[/m][/code], infact
[m][code](x . (y . (z . nil)))[/code][/m]
is also written
[m][code](x y z)[/code][/m]