Skip to content

Instantly share code, notes, and snippets.

@thieux
thieux / state-interaction.md
Last active August 9, 2017 09:15
State versus interaction - design strategies & tests

Pattern

The input (that feeds a function) can be implemented in 2 ways: controlled by the caller or by the callee.

The outputs (that is provided by a function) can be implemented in 2 ways: exposed to the caller or by message.

Input as parameter

The function's caller controls the input.