DEV Community

Discussion on: Algebraic Effects in JavaScript part 4 - Implementing Algebraic Effects and Handlers

Collapse
 
voronar profile image
Kirill Alexander Khalitov

We can achieve this temporal separation by deferring the evaluation of impure code through thunks. However, we don't want thunks flying around throughout our code, so we wrap them in an object type and define some operators to be able to lift normal functions into this type and to chain operations on this type.

Sounds like the main idea behind redux-saga library.