← Graph

Projection Function

concept 1 connections

Function taking three arguments — a reducer/block, a list of events, and an initial state — and returning new state. Analogous to Ruby's inject/reduce. Because it is pure, given the same events and initial state it always returns the same result. Used to compute current state from an event stream or to build read models. Can be started from an empty state or seeded with a cached snapshot for performance.

category
pattern
about
Projection Function concept
Shows projection as a pure fold over events with initial state.

Provenance

Read by
5 extractions