[racket] a little macro exercise

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Sat Oct 9 12:25:48 EDT 2010

2010/10/9 Shriram Krishnamurthi <sk at cs.brown.edu>:
> Spec: define a case construct syntactically just like that of Racket.
> In terms of semantics:

> - any branch can contain (break <expr>), which evaluates <expr> and
> returns its value as that of the entire case.


(let ([break 1])
  (cas-cad-e 5
             ((1) (display "1") )
             ((5) (display "5") (break 5))
             ((3) (display "3") 3)))

should the break in (break 5) be bound to the let-bound identifier or
be bound by the break introduced by cas-cad-e ?

Jens Axel Søgaard

Posted on the users mailing list.