September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
7
Task/Ackermann-function/Jq/ackermann-function-1.jq
Normal file
7
Task/Ackermann-function/Jq/ackermann-function-1.jq
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# input: [m,n]
|
||||
def ack:
|
||||
.[0] as $m | .[1] as $n
|
||||
| if $m == 0 then $n + 1
|
||||
elif $n == 0 then [$m-1, 1] | ack
|
||||
else [$m-1, ([$m, $n-1 ] | ack)] | ack
|
||||
end ;
|
||||
Loading…
Add table
Add a link
Reference in a new issue