C ++ monad库 [英] C++ monad library

查看:114
本文介绍了C ++ monad库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道C ++中有一个好的monad模板库。也许,它提供了一些常见的单子,你可能会在Haskell中看到像Maybe。 解决方案

您可能想要退房FC ++中的monad.h头文件。
您可以在此页面的Monads部分阅读更多信息: http://people.cs.umass.edu/~yannis/fc++/New1.5/lambda.html#monad



然而,这可能不适合实际的工业用途 - 尽管如此,在C ++中实现和使用它们仍然是一个很好的练习。


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.

解决方案

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.

这篇关于C ++ monad库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆