Bartosz Milewski continues to explain how to use Monads in C++.
by Bartosz Milewski
From the article:
The functional solution to our problem involves the combination of the list monad and the state monad. Mashing two monads together is not trivial — in Haskell this is done using monad transformers — but here I’ll show you how to do it manually...