B
This commit is contained in:
parent
e5e8880e41
commit
518da4a923
1019 changed files with 15877 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