Experiments with monads in C++