摘要:
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
阅读(150)
评论(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
阅读(253)
评论(0)
推荐(0)
摘要:
高级类类型就是使用其他类型构造成为一个新的类型,因此也称为 类型构造器(type constructors)。它的语法和高阶函数(higher-order functions)相似,高阶函数就是将其它函数作为参数的函数;高级类类型则是将构造类类型作为参数类型。一个高级类类型可以有一个或者多个类型作为 阅读全文
posted @ 2018-06-08 14:53
zzfx
阅读(849)
评论(0)
推荐(0)
摘要:
首先我们从最基本的泛型来看: 现在我们对上面泛型中的类型参数再进一步,也是个泛型会如何呢? 可以看到,java中不支持类型参数也是泛型类型的情况,而scala支持。这是一个很重要的区别,scala在类型系统上要比java强大。我们现在简单对类型归纳一下,可以分为两类: 1)特定类型(proper t 阅读全文
posted @ 2018-06-08 14:52
zzfx
阅读(389)
评论(0)
推荐(0)