C++ monad library
Does anyone know of a good monad template library in C++. Perhaps, one that provides some of the common monads that you wou开发者_Python百科ld see in Haskell like Maybe.
Something like Maybe can be found in Boost.Optional.
You may want to check out the "monad.h" header in FC++. You can read more about this in the "Monads" part of this page: http://people.cs.umass.edu/~yannis/fc++/New1.5/lambda.html#monad
However, this may not be suited to actual industrial use -- it's still a nice exercise to implement and use them in C++ though.
精彩评论