rescript-lang.org
rescript-lang.org copied to clipboard
Document Modulo
In reason, mod worked as an operator assert(4 mod 3 === 1).
Had a devil of a time realizing that, while still in Pervasives, rescript modulo must be used as a function assert(mod(4, 3) === 1)
But more importantly, mod is a pretty common integer operation and newcomers are going to drive themselves batty figuring out how to do it since they might not know to go fishing in Pervasives.
It's currently documented here, but I agree, it should have some mention in the integer docs as well until we finally get infix operator support for mathematical operators.