From the original Big Data Liaoliang video Video 23 speak
var triple = (x:double) = 3 *x
> triple:double = Double =
Array (3.14,1.42, 2.0). Map ((x:double) = 3 * x)
> res0:array[double] = Array (9.42, 4.26, 6.0)
Array (3.14,1.42, 2.0). map{(x:double) = 3 * x}
> res1:array[double] = Array (9.42, 4.26, 6.0)
Defaddby (factor:double) = (x:D ouble) =>factor + x
> Addby: (factor:double) Double = Double
var total =addby (5)//> total:double = Double =
println (total))//> 25.0
The above is the result of execution in worksheet
Now is the best opportunity to learn big data, do not spend a penny can become big Data master, achieve 500,000 annual salary dream.
Liaoliang's first Chinese Dream: Free for the whole society to train 1 million outstanding big data practitioners!
If you are interested please click on this link to go to Big data learning
Http://blog.sina.com.cn/s/blog_8fbd39ee0102vto3.html
If you do feel that video tutorials are helpful, you can donate big data, Internet +, online, Industry 4.0, micro-marketing, mobile internet and other free combat courses through Liaoliang Teacher's number 18610086859
You can also focus on the DT Big Data dream factory through the following two-dimensional code
Scala 18th Lecture on high-order functions from big Data Novice to Master's journey