Shared flowchart

Software · L3 · Is This Function Pure?

A decision flow for checking whether a function qualifies as pure, and what to do if it doesn't.

by @openstemUpdated Software
Inspect the functionDoes output depend only on its arguments?ImpureDoes it mutate an argument or external state?Does it perform I/O, logging, or randomness?Pure: safe to test in isolation and compose freelyPush the side effect to the edge of the programNo, reads external/global stateYesYesNoYesNo

We use privacy-friendly product analytics (no session recording, PII masked) to improve OpenStem. Load analytics? Privacy Policy