Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,10 @@
{ let rec
{ Fact = -- compile-time constant binding
{ proc { N } as -- precondition: N.IsI48[] & (N >= 0)
: if N == 0 then 1 else
N * Fact[N - 1]
}
}
in -- use Fact here or just make the whole expression to evaluate to it:
Fact
}

View file

@ -0,0 +1,11 @@
{ let rec
{ Fact = -- compile-time constant binding
{ proc { N } as -- precondition: N.IsI48[] & (N >= 0)
{ if N == 0 then 1 else
N * Fact[N - 1]
}
}
}
in -- use Fact here or just make the whole expression to evaluate to it:
Fact
}

View file

@ -0,0 +1,12 @@
{ let
{ Fact = -- compile-time constant binding
{ proc { N } as -- precondition: N.IsI48[] & (N >= 0)
: var { Res = 1 } in -- variable binding
: do Res after -- return result
: while N <> 0 do -- loop while N does not equal to zero
Res = N * Res; N = N - 1
}
}
in -- use Fact here or just make the whole expression to evaluate to it:
Fact
}