clojurescript-unraveled
clojurescript-unraveled copied to clipboard
Better explanation of side effects
I disagree with this statement:
3.7.2. Blocks [...] A side effect is something that is not necessary for the return value.
- Some side effects might also affect the return value. The return value might change depending on some external state.
- A side effect should be observable from the outside of the function scope.
(do
(println "something") ; this is a side effect
(- 1 2) ; this isn't
(+ 3 4))