[plt-scheme] probably dumb question, but...

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Mon Jan 3 14:49:03 EST 2005

Psy-Kosh wrote:

> I was messing around a bit, and discovered something... odd.
> consider the following:
> Welcome to DrScheme, version 209.
> Language: Textual (MzScheme, includes R5RS).
> > ;this is expected:
> > ,a
> unquote: not in quasiquote in: (unquote a)
> > ;the rest of this confuses me:
> > ',a
> ,a
> > (symbol? ',a)
> #f

Think of ,a as short for (unquote a).
Thus ',a evaluates to a list whose first element is the symbol unquote and
the second element is the symbol a.

  > (list? ',a)
  > (first ',a)
  > (second ',a)

Compare this with 'foo which is short for (quote foo).

Jens Axel Søgaard

Posted on the users mailing list.