C++ monad library

一个人想着一个人 提交于 2019-12-12 12:07:37

问题


Does anyone know of a good monad template library in C++. Perhaps, one that provides some of the common monads that you would see in Haskell like Maybe.


回答1:


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.




回答2:


Something like Maybe can be found in Boost.Optional.



来源:https://stackoverflow.com/questions/5448162/c-monad-library

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!