[CM] do*

Bill Schottstaedt bil at ccrma.Stanford.EDU
Sun Jan 10 04:42:49 PST 2010

> 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))

More information about the Cmdist mailing list