Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,7 @@
|
|||
#include "axiom"
|
||||
Z ==> Integer;
|
||||
fib(x:Z):Z == {
|
||||
x <= 0 => error "argument outside of range";
|
||||
f(n:Z,v1:Z,v2:Z):Z == if n<2 then v2 else f(n-1,v2,v1+v2);
|
||||
f(x,1,1);
|
||||
}
|
||||
10
Task/Anonymous-recursion/Axiom/anonymous-recursion-2.axiom
Normal file
10
Task/Anonymous-recursion/Axiom/anonymous-recursion-2.axiom
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
)abbrev package TESTP TestPackage
|
||||
Z ==> Integer
|
||||
TestPackage : with
|
||||
fib : Z -> Z
|
||||
== add
|
||||
fib x ==
|
||||
x <= 0 => error "argument outside of range"
|
||||
f : Reference((Z,Z,Z) -> Z) := ref((n, v1, v2) +-> 0)
|
||||
f() := (n, v1, v2) +-> if n<2 then v2 else f()(n-1,v2,v1+v2)
|
||||
f()(x,1,1)
|
||||
Loading…
Add table
Add a link
Reference in a new issue