Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
13
Task/Loops-For/Jq/loops-for.jq
Normal file
13
Task/Loops-For/Jq/loops-for.jq
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Single-string version using explicit nested loops:
|
||||
def demo(m):
|
||||
reduce range(0;m) as $i
|
||||
(""; reduce range(0;$i) as $j
|
||||
(.; . + "*" ) + "\n" ) ;
|
||||
|
||||
# Stream of strings:
|
||||
def demo2(m):
|
||||
range(1;m)
|
||||
| reduce range(0;.) as $j (""; . + "*");
|
||||
|
||||
# Variation of demo2 using an implicit inner loop:
|
||||
def demo3(m): range(1;m) | "*" * . ;
|
||||
Loading…
Add table
Add a link
Reference in a new issue