Arc Cross Reference

whiler

[procedure] whiler var expr endval body ...

Evaluate expr and bound var to the result. If it's nil or its the same as endval, iteration terminates. Otherwise, evaluate body... then repeat. endval and expr is evaluated every time in iteration.

(mac whiler (var expr endval . body)
  (w/uniq gf
    `((rfn ,gf (,var)
        (when (and ,var (no (is ,var ,endval)))
          ,@body 
          (,gf ,expr)))
      ,expr)))

See also: loop.