Arc Forumnew | comments | leaders | submitlogin
1 point by akkartik 2951 days ago | link | parent

Infix?! I'm curious to see how that translates to sexps.

2 points by Pauan 2951 days ago | link

Oh it's very simple. The operators + - * / < > <= >= are the only infix operators (for now). They have the usual precedence rules that other languages use.

How they work is, they take one expression on the left, and one expression on the right, and then wrap em in a list, so that `X + Y` becomes `(add X Y)`, and then "add" is the actual add function.

So they're just syntax sugar for common infix operations, that's all. That's why the last example passed "mul" to "sum" rather than "*".