码迷,mamicode.com
首页 >  
搜索关键字:functor    ( 74个结果
JavaScript函数式编程(三)
JavaScript函数式编程(一) JavaScript函数式编程(二) 在第二篇文章里,我们介绍了 Maybe、Either、IO 等几种常见的 Functor,或许很多看完第二篇文章的人都会有疑惑: 『这些东西有什么卵用?』 事实上,如果只是为了学习编写函数式、副作用小的代码的话,看完第一篇文 ...
分类:编程语言   时间:2019-05-15 15:50:29    阅读次数:165
[Functional Programming] Arrow Functor with contramap
What is Arrow Functor? Arrow is a Profunctor that lifts a function of type a -> b and allows for lazy execution of the function. Arrow can be consider ...
分类:其他好文   时间:2019-03-21 01:03:41    阅读次数:111
关于functional program language 的理解
简单说,"函数式编程"是一种"编程范式"(programming paradigm),也就是如何编写程序的方法论。 是一种编程典范,它将计算机运算视为数学上的函数计算,并且避免使用程序状态以及易变对象。 函数编程支持函数作为第一类对象,有时称为闭包或者仿函数(functor)对象。 函数式编程的列子 ...
分类:其他好文   时间:2019-02-26 23:47:11    阅读次数:279
[Functional Programming] Monad
Before we introduce what is Monad, first let's recap what is a pointed functor: A pointed functor is a Functor with .of() method Why pointed Functor i ...
分类:其他好文   时间:2019-02-24 21:27:57    阅读次数:158
[Functional Programming] Randomly Pull an Item from an Array with the State ADT (Pair)
Functor composition is a powerful concept that arises when we have one Functor nested in another Functor. It becomes even more powerful when both of t ...
分类:其他好文   时间:2019-01-18 20:07:27    阅读次数:99
Functor、Applicative 和 Monad x
首先,我们来看一下 Functor typeclass 的定义: 1 2 class Functor f where fmap :: (a -> b) -> f a -> f b Functor typeclass fmap (a -> b) f a f b f Functor 注:fmap 函数可 ...
分类:移动开发   时间:2018-10-22 12:56:31    阅读次数:164
函数对象(仿函数)
参考博客:https://www.cnblogs.com/decade-dnbc66/p/5347088.html 1、重载 ( ) 2、仿函数 仿函数(functor),就是使一个类的使用看上去象一个函数。其实现就是类中实现一个operator(),这个类就有了类似函数的行为,就是一个仿函数类了。 ...
分类:其他好文   时间:2018-09-03 13:38:53    阅读次数:163
范畴论-一个单子(Monad)说白了不过就是自函子范畴上的一个幺半群而已
范畴即为结构:包含要素和转化。 范畴为高阶类型。 函子为高阶函数。函子的输入为态射。函子为建立在态射基础上的高阶函数。函子用于保持范畴间映射的结构。态射用于范畴内部的转换。 群为运算规则的约束。 自函子是一类比较特殊的函子,它是一种将范畴映射到自身的函子 (A functor that maps a ...
分类:其他好文   时间:2018-06-08 19:20:52    阅读次数:432
Functor and Monad in Swift
I have been trying to teach myself Functional Programming since late 2013. Many of the concepts are very daunting because of their somewhat academic n ...
分类:编程语言   时间:2018-06-08 00:42:39    阅读次数:194
Functor、Applicative 和 Monad
Functor、Applicative 和 Monad 是函数式编程语言中三个非常重要的概念,尤其是 Monad ,难倒了不知道多少英雄好汉。事实上,它们的概念是非常简单的,但是却很少有文章能够将它们描述清楚,往往还适得其反,越描越黑。与其它文章不同的是,本文将从结论出发,层层深入,一步步为你揭开它 ...
分类:移动开发   时间:2018-06-06 22:01:32    阅读次数:244
74条   上一页 1 2 3 4 ... 8 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!