rescript-lang.org icon indicating copy to clipboard operation
rescript-lang.org copied to clipboard

Document Modulo

Open pckilgore opened this issue 4 years ago • 1 comments

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.

pckilgore avatar Mar 29 '21 15:03 pckilgore

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.

ryyppy avatar Apr 01 '21 07:04 ryyppy