Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
2
Task/Loops-While/Jq/loops-while-1.jq
Normal file
2
Task/Loops-While/Jq/loops-while-1.jq
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# To avoid printing 0, test if the input is greater than 1
|
||||
1024 | recurse( if . > 1 then ./2 | floor else empty end)
|
||||
1
Task/Loops-While/Jq/loops-while-2.jq
Normal file
1
Task/Loops-While/Jq/loops-while-2.jq
Normal file
|
|
@ -0,0 +1 @@
|
|||
1024 | recurse( ./2 | floor; . > 0)
|
||||
2
Task/Loops-While/Jq/loops-while-3.jq
Normal file
2
Task/Loops-While/Jq/loops-while-3.jq
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
def task: if . > 0 then ., (./2 | floor | task) else empty end;
|
||||
1024|task
|
||||
3
Task/Loops-While/Jq/loops-while-4.jq
Normal file
3
Task/Loops-While/Jq/loops-while-4.jq
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
def while(cond; update):
|
||||
def _while: if cond then ., (update | _while) else empty end;
|
||||
_while;
|
||||
1
Task/Loops-While/Jq/loops-while-5.jq
Normal file
1
Task/Loops-While/Jq/loops-while-5.jq
Normal file
|
|
@ -0,0 +1 @@
|
|||
1024|while(. > 0; ./2|floor)
|
||||
Loading…
Add table
Add a link
Reference in a new issue