The documentation mentions it, but it's not listed in the list of functions, and I can't seem to run it in a repl either.
To work around it, I just used Num.toNat Num.maxU64
instead. But I guess that will overflow on 32-bit machines?
..and maybe in wasm too? I guess it's probably better to use Num.maxU32
instead if I want my code to be portable.
...I guess it's probably better not to use Nat
, if I want my code to be portable :sweat_smile:
yeah we're actually in the process of removing Nat
from the language for that reason!
cool, that seems reasonable. I'll start using U32 or something instead.
I'll update the docs
Last updated: Jul 06 2025 at 12:14 UTC