
Le 05/03/14 18:49, Niall Douglas a écrit :
On 5 Mar 2014 at 13:54, Vicente J. Botet Escriba wrote:
I think that you must define your own monad state that could be seen as any other monad using the functional/monads framework. Once your Boost.Functional/Monads framework is available, more than happy to do so. I hate writing and particularly maintaining boilerplate.
Thoughts regarding the design much appreciated! My thanks in advance.
I will inspect your code in order to see if I've understood your needs as soon as I have enough time.
Hi, I have not taken the time to inspect your code. However I have started my POC of the Boost.Functional/Monads framework in [1]. I have just configured boost::expected<T,E> in an example of use [2] and I will extract the expected configuration soon to a specific file expected_monad.hpp. Please could you take a look at these files and see if you can configure your thenable (Monad state)? I suspect that there will be some of your needs that I have not covered yet. The design is based on [3] and [4]. Sorry for the very draft state of the code :( Best, Vicente [1] https://github.com/ptal/Boost.Expected/blob/master/boost/functional/monad.hp... [2] https://github.com/ptal/Boost.Expected/blob/master/libs/expected/test/safe_d... [3] http://yapb-soc.blogspot.fr/2012/10/monads-in-c.html [4] http://yapb-soc.blogspot.fr/2012/10/fmap-in-c.html