Skip to main content
Module

x/rimbu/mod.ts>Reducer.count

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Latest
variable Reducer.count
import { Reducer } from "https://deno.land/x/rimbu@1.2.1/mod.ts";
const { count } = Reducer;

A Reducer that remembers the amount of input items provided.

Examples

Example 1

const stream = Stream.range({ amount: 10 })
console.log(stream.reduce(Reducer.count))
// => 10

type

Reducer<any, number>