Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
7
Task/Ackermann-function/Brat/ackermann-function.brat
Normal file
7
Task/Ackermann-function/Brat/ackermann-function.brat
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
ackermann = { m, n |
|
||||
when { m == 0 } { n + 1 }
|
||||
{ m > 0 && n == 0 } { ackermann(m - 1, 1) }
|
||||
{ m > 0 && n > 0 } { ackermann(m - 1, ackermann(m, n - 1)) }
|
||||
}
|
||||
|
||||
p ackermann 3, 4 #Prints 125
|
||||
Loading…
Add table
Add a link
Reference in a new issue