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

View file

@ -0,0 +1,14 @@
# Illustration of map/1 using the builtin filter: exp
map(exp) # exponentiate each item in the input list
# A compound expression can be specified as the argument to map, e.g.
map( (. * .) + sqrt ) # x*x + sqrt(x)
# The compound expression can also be a composition of filters, e.g.
map( sqrt|floor ) # the floor of the sqrt
# Array comprehension
reduce .[] as $n ([]; . + [ exp ])
# Elementwise operation
[.[] + 1 ] # add 1 to each element of the input array

View file

@ -0,0 +1,3 @@
$ jq -c ' [.[] + 1 ]'
[0, 1 , 10]
[1,2,11]