标签:
package com.leegh.function
/**
 * @author Guohui Li
 */
object PartiaAppliedFunction {
  def main(args: Array[String]): Unit = {
    val data = List(1, 2, 3, 4, 5, 6)
    /*data.foreach(println _)
    data.foreach { x => println(x) }
    def sum(a: Int, b: Int, c: Int) = a + b + c
    println(sum(1, 2, 3))
    val fp_a = sum _
    println(fp_a(1, 2, 3))
    println(fp_a.apply(1, 2, 3))
    val fp_b = sum(1, _: Int, 3)
    println(fp_b(2))
    println(fp_b(10))*/
    data.foreach(println _)
    data.foreach(println)
  }
}
附:
 
本博客说明:
1.整理思路,提高自己。
2.受教于王家林老师,?有所收获,故推荐。
3.博客注重实践,多余的文字就不多说了,都是做技术的。
4.信息来源于 DT大数据梦工厂微信公众账号:DT_Spark。?
DT大数据梦工厂的微信公众号是DT_Spark,每天都会有大数据实战视频发布,请您持续学习。
Scala 深入浅出实战经典(1-64讲)完整视频、PPT、代码下载:
百度云盘:http://pan.baidu.com/s/1c0noOt6
腾讯微云:http://url.cn/TnGbdC
360云盘:http://yunpan.cn/cQ4c2UALDjSKy 访问密码 45e2
标签:
原文地址:http://www.cnblogs.com/leegh1992/p/4711758.html