最近看Spark的东西,由于之前没有接触过lambda函数表达式,所以搜了点资料,特地纪录在此
|
1
|
(argument) => //funtion body |
|
1
|
(s1: String, s2 :String) => s1.length - s2.length |
|
1
2
3
4
|
val outer =10val myFuncLiteral = (y: Int) => y * outerval result = myFuncLiteral(2)> 20 |
原文:http://www.cnblogs.com/inspursu/p/4276469.html