Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better explanation of side effects #145

Open
t-gebauer opened this issue Aug 16, 2017 · 0 comments
Open

Better explanation of side effects #145

t-gebauer opened this issue Aug 16, 2017 · 0 comments

Comments

@t-gebauer
Copy link
Contributor

I disagree with this statement:

3.7.2. Blocks [...]
A side effect is something that is not necessary for the return value.

  1. Some side effects might also affect the return value. The return value might change depending on some external state.
  2. 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))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant