摘要: package spark.demo object MyApp2 { // 部分适用 def msg (from: String, to: String, text: String) = s"($from -> $to): $text" def main(args: Array[String]): 阅读全文
posted @ 2020-09-25 16:35 初入门径 阅读(606) 评论(0) 推荐(0)
摘要: package spark.demoobject MyApp { def main(args: Array[String]): Unit = { // 函数柯理化 val multiFunc = (a: Int, b: Int) => a * b val multiFuncCurried = (a: 阅读全文
posted @ 2020-09-25 16:33 初入门径 阅读(184) 评论(0) 推荐(0)
摘要: scala> val add = (x: Int, y: Int) => x + y add: (Int, Int) => Int = <function2> scala> // add: (Int, Int) => Int = <function2> scala> scala> val addCu 阅读全文
posted @ 2020-09-25 16:09 初入门径 阅读(87) 评论(0) 推荐(0)