Arc Forumnew | comments | leaders | submitlogin
1 point by absz 6147 days ago | link | parent

Oooh, I like this! That's a very nice way to handle infix. Minor nitpick, though: why not just have arith be

  (mac arith body
    `(let ^ expt
       (infix ((+ 1 left) (- 1 left) (* 2 left) (/ 2 left) (^ 3 left)) ,@body)))
? That way you also get floating point and complex exponents for free.


3 points by cchooper 6147 days ago | link

Because I couldn't find the expt function. D'oh!

I'll edit the above to use it.

Hmmm... where did the edit button go?

-----

4 points by absz 6147 days ago | link

Editing is time-limited; I can't decide if that's a good or a bad thing.

-----