Arc Forumnew | comments | leaders | submitlogin
4 points by rocketnia 5133 days ago | link | parent

My 'xloop at http://github.com/rocketnia/lathe has a more convenient interface at the expense of overall simplicity. It supports the usual syntax, but it also lets you leave off the parentheses as long as the things you're binding to are non-nil, non-ssyntax symbols, like most variable names are.

  (xloop i 1 total 1
    (if (> i n)
      total
      (next (+ i 1) (* total i))))
The restriction on the bindings makes it possible to figure out where the body starts.