[racket] a little macro exercise

From: Shriram Krishnamurthi (sk at cs.brown.edu)
Date: Sat Oct 9 23:18:21 EDT 2010

On Sat, Oct 9, 2010 at 10:30 PM, David Herman <dherman at ccs.neu.edu> wrote:

> I think you may be missing a crucial point: once control hits the
> first passing test, there are no more conditionals; every right-hand
> side is compiled as a procedure that unconditionally tail-calls the
> next right-hand side.

This is how my solution (posted alongside the problem) is set up, to
convey this idea.  This avoids any code size blow-up: every clause
simply has one extra tail-call to the next clause, which is a constant
overhead.  (Well, logarithmic, if you want to get really, really,
really picky.)

Shriram


Posted on the users mailing list.