A pure function is a function which:
Given the same input, always returns the same output and the Produces have no side effects.
Preoperties
- No random values
- No current date/time
- No global state
- No mutation of parameters
Benefits
- Self-documenting
- Easily testable
Use the share button below if you liked it.
It makes me smile, when I see it.