Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 1.08 KB

handling-state.md

File metadata and controls

19 lines (13 loc) · 1.08 KB
layout title seriesIndexId
series_index
The 'Handling State' series
Handling State

In this series of posts, I'll look at how you can thread state through a series of pure functions in a convenient way.

To start with, I'll tell the story of Dr Frankenfunctor and the Monadster, and how the Doctor needed a way to create "recipes" that were activated when lightning struck.

The Doctor then devised ways to work with these recipes using functions such as map, bind and apply.

In the final post, we'll see how we can use a computation expression to make the coding cleaner, and how these techniques can be generalized into the so-called "state monad".

Warning! These posts contains gruesome topics, strained analogies, discussion of monads