September 2017
Beginner to intermediate
396 pages
9h 46m
English
A Writer monad works with an assumption that the write state is an instance of a monoid. As a monoid, you will get two properties:
A Writer monad hence starts with an empty (or scratch) value. As we use the function tell in the context of Writer monad, the Writer monad keeps combining the existing value with a new value and updates the writer state.
In our recipe, we used Transaction and its monoid instance to keep our balance sheet automatically updated.
Read now
Unlock full access