Type-level natural number literals
// Convert a type-level number to UInt64
///|
let value = to_uint64((_ : Od42[Z]) => ()) // Returns 42 as UInt64
// Convert to Int
///|
let int_value = to_int((_ : Od42[Z]) => ()) // Returns 42 as Intto_uint64((_ : Od5[Z]) => ()) // 5
to_uint64((_ : Od3[Od21[Z]]) => ()) // 321
to_uint64((_ : Od12[Od34[Od56[Z]]]) => ()) // 123456to_uint64((_ : OxA[Z]) => ()) // 10
to_uint64((_ : OxF[Z]) => ()) // 15
to_uint64((_ : Ox12[Ox34[Ox56[Z]]]) => ()) // 0x123456// Using convenience types
to_uint64((_ : Od12[Z]) => ()) // 12
to_uint64((_ : Od99[Z]) => ()) // 99
// Using nested types
to_uint64((_ : Od2[Od10[Z]]) => ()) // 210moon update
moon add tonyfettes/natpub fn[T : ToUInt64] to_uint64(_ : (T) -> Unit) -> UInt64
pub fn[T : ToInt] to_int(_ : (T) -> Unit) -> Inttype Od0[_]type Od1[_]type Od2[_]type Od3[_]type Od4[_]type Od5[_]type Od6[_]type Od7[_]type Od8[_]type Od9[_]type Ox0[_]type Ox1[_]type Ox2[_]type Ox3[_]type Ox4[_]type Ox5[_]type Ox6[_]type Ox7[_]type Ox8[_]type Ox9[_]type OxA[_]type OxB[_]type OxC[_]type OxD[_]type OxE[_]type OxF[_]type ZType-level natural number literals