[plt-scheme] Syntax question (improper lists)

From: Danny Yoo (dyoo at hkn.eecs.berkeley.edu)
Date: Mon Jan 30 17:09:45 EST 2006

On Mon, 30 Jan 2006, Greg Woodhouse wrote:

> Anyway, I'm thinking that
> a) I really do need to treat '() specially and not as a list.

Hi Greg,

Yeah; it's something of an edge case; according to:


they make a point to say that the empty list is treated as special.

> b) Using dotted pairs wasn't such a great idea, and I really ought to
> use proper lists.

I'm not sure a choice in representation really matters.  As long as we
abstract the tag and value selectors, it shouldn't make too much of a
difference, unless I'm missing something here.

> Having said that, I don't think I quite understand the rules here.

MzScheme is a little looser than the r5rs doc, since the last paragraph


metions that () is not syntactically valid as an expression.  In contrast,
the MzScheme reference manual extends things a bit and says that it's ok,
and that it's magically transformed to '():


Best of wishes!

Posted on the users mailing list.