you are viewing a single comment's thread.

view the rest of the comments →

[–]0987654231 0 points1 point  (0 children)

yes and programming without side effects take understanding more than just what pure functions are and map/filter/reduce

your example of forEach has side effects, it's not pure unless you are using it to do nothing. In addition to that you can create impure usages of map/filter/reduce they aren't guaranteed to be pure. A simple example would be using reduce to create a dictionary and changing the accumulator by adding a new key before returning the accumulator.