[racket] Macro example in Racket Guide

From: Eli Barzilay (eli at barzilay.org)
Date: Mon Jun 4 23:48:42 EDT 2012

A few minutes ago, Jon Rafkind wrote:
> Also that example is somewhat bizarre.. I think the (clock a ...)
> template should be (get-clock) instead of ((get-clock) a ...),
> right?

No -- with that change you get a weird identifier macro where


evaluates to (for example) 0, and

  (clock 1 2 3)

evaluates to 0 too.  Using ((get-clock) a ...) makes the latter throw
an error which makes it behave uniformly.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the users mailing list.