|
|
SideEffect
Definition of side effect.
Side Effects
A side effect is an effect or consequence arising from the evaluation of a function or expression that is different from the values popped from or pushed on to the stack.
Some examples of side-effects are:
- Writing something to a file
- Creating a directory
- Printing a message to the console
- Displaying a graphical element
- Sending a mild electric shock to someone
A function or expression with no side-effects is called pure and a function or expression with side-effects is called impure.
Sign in to add a comment
