Arc Forumnew | comments | leaders | submitlogin
4 points by almkglor 6117 days ago | link | parent

Yet another alternative:

   (mac trav ((go v) s . body)
      `((rfn ,go (,v)
            ,@body)
        ,s))

   (trav (go node) b
      (go node!l)
      (a node!d)
      (go node!r))
The above is arguably lispier, and removes the need for [] everywhere.


1 point by almkglor 6116 days ago | link

Bugged, of course ^^ Forgot the (when ...) test.

   (mac trav ((go v) s . body)
      `((rfn ,go (,v)
            (when ,v
              ,@body))
        ,s))

-----