Fix manual on paths/1 to use boolean filter for its argument
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by itchyny · committed by Nico Williams · parent ab1a681 · Browse files · 4 files·+10 added−10 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+10 added−10 removed
- tests:+1 added−1 removed
- other:+9 added−9 removed
Provenance
- Commit
cac216a- Tree
fc4891d- Author
itchyny <itchyny@cybozu.co.jp>- Committer
Nico Williams <nico@cryptonector.com>- Parent
ab1a681
4 files changed+10 added−10 removed
modified:docs/content/manual/v1.5/manual.yml+3 added-3 removed
889 unmodified lines890 `paths` outputs the paths to all the elements in its input891 (except it does not output the empty list, representing .892 itself).893 894- `paths(f)` outputs the paths to any values for which `f` is true.895- That is, `paths(numbers)` outputs the paths to all numeric894+ `paths(f)` outputs the paths to any values for which `f` is `true`.895+ That is, `paths(type == "number")` outputs the paths to all numeric896 values.897 898 `leaf_paths` is an alias of `paths(scalars)`; `leaf_paths` is899 *deprecated* and will be removed in the next major release.1 unmodified line901 examples:902 - program: '[paths]'903 input: '[1,[[],{"a":2}]]'904 output: ['[[0],[1],[1,0],[1,1],[1,1,"a"]]']905- - program: '[paths(scalars)]'905+ - program: '[paths(type == "number")]'906 input: '[1,[[],{"a":2}]]'907 output: ['[[0],[1,1,"a"]]']908 909 - title: "`add`"1964 unmodified linesmodified:docs/content/manual/v1.6/manual.yml+3 added-3 removed
1050 unmodified lines1051 `paths` outputs the paths to all the elements in its input1052 (except it does not output the empty list, representing .1053 itself).1054 1055- `paths(f)` outputs the paths to any values for which `f` is true.1056- That is, `paths(numbers)` outputs the paths to all numeric1055+ `paths(f)` outputs the paths to any values for which `f` is `true`.1056+ That is, `paths(type == "number")` outputs the paths to all numeric1057 values.1058 1059 `leaf_paths` is an alias of `paths(scalars)`; `leaf_paths` is1060 *deprecated* and will be removed in the next major release.1 unmodified line1062 examples:1063 - program: '[paths]'1064 input: '[1,[[],{"a":2}]]'1065 output: ['[[0],[1],[1,0],[1,1],[1,1,"a"]]']1066- - program: '[paths(scalars)]'1066+ - program: '[paths(type == "number")]'1067 input: '[1,[[],{"a":2}]]'1068 output: ['[[0],[1,1,"a"]]']1069 1070 - title: "`add`"2227 unmodified linesmodified:docs/content/manual/manual.yml+3 added-3 removed
1146 unmodified lines1147 `paths` outputs the paths to all the elements in its input1148 (except it does not output the empty list, representing .1149 itself).1150 1151- `paths(f)` outputs the paths to any values for which `f` is true.1152- That is, `paths(numbers)` outputs the paths to all numeric1151+ `paths(f)` outputs the paths to any values for which `f` is `true`.1152+ That is, `paths(type == "number")` outputs the paths to all numeric1153 values.1154 1155 examples:1156 - program: '[paths]'1157 input: '[1,[[],{"a":2}]]'1158 output: ['[[0],[1],[1,0],[1,1],[1,1,"a"]]']1159- - program: '[paths(scalars)]'1159+ - program: '[paths(type == "number")]'1160 input: '[1,[[],{"a":2}]]'1161 output: ['[[0],[1,1,"a"]]']1162 1163 - title: "`add`"2293 unmodified linesmodified:tests/man.test+1 added-1 removed
306 unmodified lines307 [paths]308 [1,[[],{"a":2}]]309 [[0],[1],[1,0],[1,1],[1,1,"a"]]310 311-[paths(scalars)]311+[paths(type == "number")]312 [1,[[],{"a":2}]]313 [[0],[1,1,"a"]]314 315 add583 unmodified lines