Base120 · Composition

Functional Composition

CO · Composition

Chain pure operations where output of one becomes input of next

Model code
CO3
Transformation
CO (Composition) — Combine elements so the integrated value exceeds the sum of parts.
Priority
3 of 20
Framework
HUMMBL Base120 — 120 mental models across 6 transformations

When to use

"Use when processing can be expressed as a chain of pure operations where each output feeds the next. Enables reasoning about each step independently and testing them in isolation."

Example

"A data pipeline — fetch(raw_url) -> parse_json(data) -> validate_schema(json) -> transform(records) -> load(db). Each function is pure (same input, same output), so any step can be tested or replaced independently."

Common misuse

"Introducing side effects or shared state into the chain. Once a step depends on external mutable state, the composition is no longer pure and reasoning about the whole requires reasoning about all the state."

Also known as

Function CompositionPipeline Pattern

Related models