Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
1
Task/Anonymous-recursion/Jq/anonymous-recursion-1.jq
Normal file
1
Task/Anonymous-recursion/Jq/anonymous-recursion-1.jq
Normal file
|
|
@ -0,0 +1 @@
|
|||
0 | recurse(. + 1)
|
||||
8
Task/Anonymous-recursion/Jq/anonymous-recursion-2.jq
Normal file
8
Task/Anonymous-recursion/Jq/anonymous-recursion-2.jq
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
def fib(n):
|
||||
def aux: if . == 0 then 0
|
||||
elif . == 1 then 1
|
||||
else (. - 1 | aux) + (. - 2 | aux)
|
||||
end;
|
||||
if n < 0 then error("negative arguments not allowed")
|
||||
else n | aux
|
||||
end ;
|
||||
Loading…
Add table
Add a link
Reference in a new issue