3 ms·
I find the nesting of elements hard to follow and would prefer something like: -- factorial (extern "manool.org.18/std/0.2/all") in: let:
by karmakaze 7y ago
I find the nesting of elements hard to follow and would prefer something like:
-- factorial
(extern "manool.org.18/std/0.2/all") in:
let:
Fact =
proc { N } as:
unless N.IsI48[] & (N >= 1 - 1) signal
(if (~)[N.IsI48[]] then TypeMismatch else InvariantViolation)
else:
var { Res = 1 } in
do Res after
while N <> 0 do Res = N * Res; N = N + ~1
in:
Out.WriteLine[/* Out; */ "Factorial of 10 is "; Fact[10]$]