On Thu, Jan 31, 2008 at 03:36:34PM -0800, [EMAIL PROTECTED] wrote:
On Thu, Jan 31, 2008 at 01:35:56PM -0800, Andrew Lentvorski wrote:
DOT indicates a pure pair. It must have exactly one sexpr on the left
and exactly one sexpr on the right.
Don't shoot me but I'm questioning the need for conses and all this "dot"
stuff. Even SICP doesn't mention conses in the first chapter.
Sure it may be a nice optimization but for teaching purposes I don't see
why list can't be *thee* fundamental data structure.
Well, simply, conses _are_ the fundamental data structure. One of the
things you can build out of them are lists, but you can build other things
as well.
Lists are _not_ a primitive type in lisp, like they are in some other
language. Second is not a primitive, (car (cdr x)) is. If you try to
implement using lists instead of pairs, you'll get something very different
than lisp.
And, you don't have to get all Shakespearean on us :-)
David
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg