mirror of
https://github.com/wader/fq.git
synced 2024-11-29 12:14:17 +03:00
dd4fa26867
Found via `codespell -S format -L bu,ue,trys,nd,tbe,te,trun,actuall`
23 lines
317 B
Plaintext
23 lines
317 B
Plaintext
# Generators and backtracking
|
|
> 1, (2, 3 | . * 2), 4
|
|
1
|
|
4
|
|
6
|
|
4
|
|
|
|
# Conditional, boolean operators and comparison
|
|
> if 1 == 2 and true then "a" else "b" end
|
|
"b"
|
|
|
|
# Reduce and foreach
|
|
> reduce (1,2,3) as $i (0; . + $i)
|
|
6
|
|
> foreach (1,2,3) as $i (0; . + $i; .)
|
|
1
|
|
3
|
|
6
|
|
|
|
# Bindings (variables)
|
|
> 1 as $a | 2 as $b | $a + $b
|
|
3
|