Fix manual on paths/1 to use boolean filter for its argument

This commit is contained in:
itchyny authored and Nico Williams committed 2023-07-09 10:54:13 -05:00
1 parent ab1a68144d
commit cac216a39c
4 files changed
+10 -10

No files matched your search

+3 -3
View File
@@ -1148,15 +1148,15 @@ sections:
(except it does not output the empty list, representing .
itself).
`paths(f)` outputs the paths to any values for which `f` is true.
That is, `paths(numbers)` outputs the paths to all numeric
`paths(f)` outputs the paths to any values for which `f` is `true`.
That is, `paths(type == "number")` outputs the paths to all numeric
values.
examples:
- program: '[paths]'
input: '[1,[[],{"a":2}]]'
output: ['[[0],[1],[1,0],[1,1],[1,1,"a"]]']
- program: '[paths(scalars)]'
- program: '[paths(type == "number")]'
input: '[1,[[],{"a":2}]]'
output: ['[[0],[1,1,"a"]]']
+3 -3
View File
@@ -891,8 +891,8 @@ sections:
(except it does not output the empty list, representing .
itself).
`paths(f)` outputs the paths to any values for which `f` is true.
That is, `paths(numbers)` outputs the paths to all numeric
`paths(f)` outputs the paths to any values for which `f` is `true`.
That is, `paths(type == "number")` outputs the paths to all numeric
values.
`leaf_paths` is an alias of `paths(scalars)`; `leaf_paths` is
@@ -902,7 +902,7 @@ sections:
- program: '[paths]'
input: '[1,[[],{"a":2}]]'
output: ['[[0],[1],[1,0],[1,1],[1,1,"a"]]']
- program: '[paths(scalars)]'
- program: '[paths(type == "number")]'
input: '[1,[[],{"a":2}]]'
output: ['[[0],[1,1,"a"]]']
+3 -3
View File
@@ -1052,8 +1052,8 @@ sections:
(except it does not output the empty list, representing .
itself).
`paths(f)` outputs the paths to any values for which `f` is true.
That is, `paths(numbers)` outputs the paths to all numeric
`paths(f)` outputs the paths to any values for which `f` is `true`.
That is, `paths(type == "number")` outputs the paths to all numeric
values.
`leaf_paths` is an alias of `paths(scalars)`; `leaf_paths` is
@@ -1063,7 +1063,7 @@ sections:
- program: '[paths]'
input: '[1,[[],{"a":2}]]'
output: ['[[0],[1],[1,0],[1,1],[1,1,"a"]]']
- program: '[paths(scalars)]'
- program: '[paths(type == "number")]'
input: '[1,[[],{"a":2}]]'
output: ['[[0],[1,1,"a"]]']
+1 -1
View File
@@ -308,7 +308,7 @@ null
[1,[[],{"a":2}]]
[[0],[1],[1,0],[1,1],[1,1,"a"]]
[paths(scalars)]
[paths(type == "number")]
[1,[[],{"a":2}]]
[[0],[1,1,"a"]]