Make any/2 and all/2 efficient using foreach

This commit is contained in:
Nicolas Williams committed 2014-07-07 22:25:34 -05:00
1 parent 80a9937e48
commit 4bcff40828
2 files changed
+28 -2

No files matched your search

+16
View File
@@ -502,6 +502,22 @@ reduce .[] as $x (0; . + $x)
[1,2,4]
7
. as $dot|any($dot[];not)
[1,2,3,4,true,false,1,2,3,4,5]
true
. as $dot|any($dot[];not)
[1,2,3,4,true]
false
. as $dot|all($dot[];.)
[1,2,3,4,true,false,1,2,3,4,5]
false
. as $dot|all($dot[];.)
[1,2,3,4,true]
true
#
# Paths
#