> For AI agents: the complete documentation index is available at https://massaman.dev/llms.txt, the full documentation bundle is available at https://massaman.dev/llms-full.txt.

# Concepts

Failure as data, exhaustive branching, and composable transformations.


[CompositionComposition builds larger operations from small functions. Each step receives the previous step's output, which keeps transformations explicit and avoids intermediate mutable state.](/concepts/composition)[Pattern Matching`massaman/match` re-exports [`ts-pattern`](https://github.com/gvergnaud/ts-pattern) and adds `P.ok` and `P.err` patterns for Massaman results. It turns branching into an expression and can prove that every variant of a union is handled.](/concepts/match)[Result & ErrorsMassaman treats expected failure as data. A fallible operation returns a `Result<T>` so its caller can see and handle both outcomes without relying on an exception path.](/concepts/result)