- count<Item, Predicated>(predicate: Predicate<Item, Predicated>): (<Iterable>(iterable: Iterable) => ReducerOutput<GeneratorOutput<Iterable>, number>)
-
Parameters
-
predicate: Predicate<Item, Predicated>
Returns (<Iterable>(iterable: Iterable) => ReducerOutput<GeneratorOutput<Iterable>, number>)
-
- <Iterable>(iterable: Iterable): ReducerOutput<GeneratorOutput<Iterable>, number>
-
Type Parameters
-
Iterable extends AsynchronousIterable<Item>
Counts the number of items that satisfy a predicate in the given iterable or asynchronous iterable.
Example
Returns
Curried function with
predicate
in context.