猿与斯卡拉的monad [英] monoid vs monad in Scala

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

问题描述

我最近试图找到单子和单子之间区别的很好来源。



有人可以提供一个关于此的良好资源的链接,或者花时间详细说明相似性/差异性吗?

解决方案

monads是内蒙古工程师类别中的单片。因此, monad只是monoid的一个例子,这是一个更一般的概念。

而且,尽管这在技术上可能是真实的,但最简单的答案是monads和monoid是真的没有任何东西像彼此,你不应该试图去了解它们之间的区别,而只是学习它们。互联网上有很多关于它的资料,很容易被Google搜索到。

I have recently tried to find a good source on the difference between monads and monoids.

Could someone provide a link to a good resource on this or perhaps take one's time to elaborate on the similarities/differences?

解决方案

Monads are monoids in the category of endofunctors. Therefore, a monad is just one example of monoid, which is a more general concept.

And, though that might be technically true, the most simple answer is that monads and monoids are really nothing like each other, and you shouldn't be trying to learn the difference between them, but just learn them. There's ton of material about it on the internet, easily googled.

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

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