Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Ackermann-function/SPAD/ackermann-function.spad
Normal file
11
Task/Ackermann-function/SPAD/ackermann-function.spad
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
NNI ==> NonNegativeInteger
|
||||
|
||||
A:(NNI,NNI) -> NNI
|
||||
|
||||
A(m,n) ==
|
||||
m=0 => n+1
|
||||
m>0 and n=0 => A(m-1,1)
|
||||
m>0 and n>0 => A(m-1,A(m,n-1))
|
||||
|
||||
-- Example
|
||||
matrix [[A(i,j) for i in 0..3] for j in 0..3]
|
||||
Loading…
Add table
Add a link
Reference in a new issue