4 ms·
Essentially implied by what Mitchell has said, but it's good to point out that pure functions have referential transparency, which means that for a given input,
by michaelschade 15y ago
Essentially implied by what Mitchell has said, but it's good to point out that pure functions have referential transparency, which means that for a given input, the function will always give the same output. (So, `myFunc 7' always yields the same answer), which makes it easier to reason about your code and have more reliable tests against these functions.
More reading here: http://www.haskell.org/haskellwiki/Functional_programming#Purity http://www.haskell.org/haskellwiki/Functional_programming#Pu...