M6 · Functional programming
Use case
Section titled “Use case”Relay’s processing pipeline is rebuilt as a functional core with an imperative shell: decoding, validation, routing and retry planning become pure functions over immutable data that return values, never throw, and are tested without mocks. Only the thin shell around them touches the network, the queue and the clock. The capstone goes one step further and makes the side effects themselves values.