0
Pure &Impure functions
Hey, i didn't really understand what's the differents between pure and impure functions. can anyone help?
2 Antworten
+ 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.