摘要:
How to use type alias to name a Tuple2 pair into a domain type called CartItem type CartItem[Donut, Int] = Tuple2[Donut, Int] 阅读全文
posted @ 2019-07-12 11:13
嵌入式实操
阅读(150)
评论(0)
推荐(0)
摘要:
Partial函数的定义 scala> val isVeryTasty: PartialFunction[String, String] = { case "Glazed Donut" | "Strawberry Donut" => "Very Tasty"}isVeryTasty: Partial 阅读全文
posted @ 2019-07-12 10:59
嵌入式实操
阅读(139)
评论(0)
推荐(0)
摘要:
可以使用scala库,可以从字面上看出是在调用 递归函数: code resule: 阅读全文
posted @ 2019-07-12 10:02
嵌入式实操
阅读(187)
评论(0)
推荐(0)
摘要:
Ordering using andThen: f(x) andThen g(x) = g(f(x)) Ordering using compose: f(x) compose g(x) = f(g(x)) result: 阅读全文
posted @ 2019-07-12 09:50
嵌入式实操
阅读(88)
评论(0)
推荐(0)
浙公网安备 33010602011771号