1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Combine Stateful Computations Using Composition

    javascriptJavaScript

    We explore a means to represent the combination of our stateful computations using familiar composition. We dive into what makes this possible by talking about what are known as Kleisli Arrows and explore some interesting properties surrounding them.

    Once we understand the basics of how our stateful computations are chained, we look at how we can enlist a special compose helper named composeK. Using composeK, we show how we can further remove a lot of the boilerplate sometimes used to combine stateful computations.