Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 440 Bytes

count.md

File metadata and controls

19 lines (13 loc) · 440 Bytes
Folds.count([f,] collection; [executor_options...])
Folds.count([f,] collection, executor)

Count the number of true items in collection or items that evaluates to true by f. Parallel by default.

See Extended help in Folds.reduce for more information.

Examples

julia> using Folds

julia> Folds.count([true, true, false])
2

julia> Folds.count(gcd(x, 857142) == 1 for x in 1:10_000_000)
2721603