brakmic / purescript-redux

:alien: Redux Bindings for PureScript
MIT License
36 stars 9 forks source link

Simplifies extractReducer #5

Closed MichaelBaker closed 8 years ago

MichaelBaker commented 8 years ago

The previous version of extractReducer breaks the scope of the reducer. When it gets evaled there is no guarantee that the variables referenced in the body of the reducer are in scope.

With the new approach, the reducer is used as a normal function, so it retains all of the variables that it has closed over.

brakmic commented 8 years ago

Many thanks! :+1: