0
Pure &Impure functions
Hey, i didn't really understand what's the differents between pure and impure functions. can anyone help?
2 Answers
+ 3
Pure functions do not change state
Whereas impure functions change state
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2459/
0
An impure function mutates variables/state/data outside of itâs lexical scope.
Pure functions donât modify external variables/state/data outside of the scope, and returns the same output given the same input.