[plt-scheme] Newbie macro problem

From: Robert Bruce Findler (robby at cs.uchicago.edu)
Date: Fri Nov 1 16:01:18 EST 2002

At Fri, 1 Nov 2002 13:55:40 -0500, John Clements wrote:
> (define (flex-format str . rest)
>    (with-handlers ([exn:application:mismatch?
>                     (lambda (exn)
>                       (apply flex-format str (reverse (cdr (reverse 
> rest)))))])
>      (apply format str rest)))
> No 'count-format-arguments' required.
> And very elegant, I might add.

Yikes! Take away this guy's PLT shirt!


PS: seriously, it seems easier to read the other version and it is
probably much more efficient. This version does have better "single
point of control" but I'm not sure that is relatively important given
the loss in readability and a good test suite for flex-format.

Posted on the users mailing list.