[plt-scheme] Newbie macro problem
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!
Robby
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.