[CM] do*

Heinrich Taube taube at uiuc.edu
Sun Jan 10 06:32:56 PST 2010


thanks, ill try it out!
On Jan 10, 2010, at 6:42 AM, Bill Schottstaedt wrote:

>> ive even gotten used to the (do () )  abomination (still often wish
>> for do*  )
>
> would this work?
>
> (defmacro do* (spec end . body)
>  `(let* (,@(map (lambda (var) (list (car var) (cadr var))) spec))
>     (do () ,end
>       , at body
>       ,@(map (lambda (var) (list 'set! (car var) (caddr var)))  
> spec))))
>
> ;(do* ((i 0 (+ i 1)) (j i (+ i 1))) ((= i 3) "hiho") (display j))
>
> _______________________________________________
> Cmdist mailing list
> Cmdist at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist



More information about the Cmdist mailing list