摘要:
函子是两个范畴之间的一种映射(关系) 阅读全文
posted @ 2018-06-08 16:35
zzfx
阅读(236)
评论(0)
推荐(0)
摘要:
大致介绍了幺半群(monoid)后,我们重新回顾最初引用wadler(haskell委员会成员,把monad引入haskell的家伙)的那句话: 现在我们来解读这句话中包含的另一个概念:自函子(Endofunctor),不过我们先需要一些铺垫: 首先,什么是函子(Functor)? 乍一看名字,以为 阅读全文
posted @ 2018-06-08 16:23
zzfx
阅读(591)
评论(0)
推荐(0)
摘要:
One of the more powerful features Scala has is the ability to generically abstract across things that take type parameters. This feature is known as H 阅读全文
posted @ 2018-06-08 16:22
zzfx
阅读(215)
评论(0)
推荐(0)
摘要:
http://adriaanm.github.io/files/higher.pdf https://www.atlassian.com/blog/archives/scala-types-of-a-higher-kind 阅读全文
posted @ 2018-06-08 15:54
zzfx
阅读(155)
评论(0)
推荐(0)
摘要:
, pronounced "type", is the kind of all data types seen as nullary type constructors, and also called proper types in this context. This normally incl 阅读全文
posted @ 2018-06-08 15:14
zzfx
阅读(282)
评论(0)
推荐(0)
摘要:
高级类类型就是使用其他类型构造成为一个新的类型,因此也称为 类型构造器(type constructors)。它的语法和高阶函数(higher-order functions)相似,高阶函数就是将其它函数作为参数的函数;高级类类型则是将构造类类型作为参数类型。一个高级类类型可以有一个或者多个类型作为 阅读全文
posted @ 2018-06-08 14:53
zzfx
阅读(875)
评论(0)
推荐(0)
摘要:
首先我们从最基本的泛型来看: 现在我们对上面泛型中的类型参数再进一步,也是个泛型会如何呢? 可以看到,java中不支持类型参数也是泛型类型的情况,而scala支持。这是一个很重要的区别,scala在类型系统上要比java强大。我们现在简单对类型归纳一下,可以分为两类: 1)特定类型(proper t 阅读全文
posted @ 2018-06-08 14:52
zzfx
阅读(422)
评论(0)
推荐(0)

浙公网安备 33010602011771号