We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f61ea53 commit 0f7c89fCopy full SHA for 0f7c89f
base/reduce.jl
@@ -387,19 +387,21 @@ end
387
any(itr) = any(identity, itr)
388
all(itr) = all(identity, itr)
389
390
-any(f::Any, itr) = any(Predicate(f), itr)
+any(f::Any, itr) = any(Predicate(f), itr)
391
any(f::Predicate, itr) = mapreduce_sc_impl(f, |, itr)
392
-any(f::typeof(identity), itr) =
+any(f::typeof(identity), itr) =
393
eltype(itr) <: Bool ?
394
mapreduce_sc_impl(f, |, itr) :
395
reduce(or_bool_only, itr)
396
+or_bool_only(a::Bool, b::Bool) = a | b
397
-all(f::Any, itr) = all(Predicate(f), itr)
398
+all(f::Any, itr) = all(Predicate(f), itr)
399
all(f::Predicate, itr) = mapreduce_sc_impl(f, &, itr)
-all(f::typeof(identity), itr) =
400
+all(f::typeof(identity), itr) =
401
402
mapreduce_sc_impl(f, &, itr) :
403
reduce(and_bool_only, itr)
404
+and_bool_only(a::Bool, b::Bool) = a & b
405
406
## in & contains
407
0 commit comments