| ▲ | knome 2 hours ago | |
a pure function doesn't have side effects. it doesn't read from nonlocal state or trigger distant changes nor perform any manner of io. a pure function doesn't change its inputs, it simply uses them to craft it's outputs. bringing in an object or function via parameter to perform these side effects still leaves the function impure. | ||