Pitfalls

Operator precedence

Unary minus issue (something similar happens in OCaml as well):

-1 acos 
#=> 0 (expected pi)

This is because it is evaluated as -(1 acos). Instead, use (-1) acos or 1 negate acos.

Also, as seen on IRC:

<bolsen> 1 * 578 + (1 - 1)*578  --> 334084 ... ? :)
<geezusfreeek> that's an amazing bug
<jer> bolsen, right; because io parses that as 1 *(578 +(1 -(1))) *(578)
<jer> and it's not a bug
<jer> it's how io is parsed
<jer> operator precedence is a major headache