Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

6
Task/Amb/Jq/amb-1.jq Normal file
View file

@ -0,0 +1,6 @@
def amb: .[];
def joins:
(.[0][-1:]) as $left
| (.[1][0:1]) as $right
| if $left == $right then true else empty end;

8
Task/Amb/Jq/amb-2.jq Normal file
View file

@ -0,0 +1,8 @@
(["the","that","a"] | amb) as $word1
| (["frog","elephant","thing"] | amb) as $word2
| [$word1, $word2] | joins
| (["walked","treaded","grows"] | amb) as $word3
| [$word2, $word3] | joins
| (["slowly","quickly"] | amb) as $word4
| [$word3, $word4] | joins
| [$word1, $word2, $word3, $word4]

7
Task/Amb/Jq/amb-3.jq Normal file
View file

@ -0,0 +1,7 @@
jq -n -f amb.jq
[
"that",
"thing",
"grows",
"slowly"
]

6
Task/Amb/Jq/amb-4.jq Normal file
View file

@ -0,0 +1,6 @@
def amb(condition): .[] | select(condition);
def joins:
(.[0][-1:]) as $left
| (.[1][0:1]) as $right
| $left == $right ;

5
Task/Amb/Jq/amb-5.jq Normal file
View file

@ -0,0 +1,5 @@
(["the","that","a"] | amb(true)) as $word1
| (["frog","elephant","thing"] | amb( [$word1, .] | joins)) as $word2
| (["walked","treaded","grows"] | amb( [$word2, .] | joins)) as $word3
| (["slowly","quickly"] | amb( [$word3, .] | joins)) as $word4
| [$word1, $word2,$word3, $word4]