特牛网址导航

scala的一些知识点(一)_scala的知识点-CSDN博客

网友收藏
文章浏览阅读186次。函数: val sum = (x:Int,y:Int) => {x+y}方法: def sum(x:Int,y:Int) = {x+y} //定义方法 def m1(x:Int,f:Int=>Int) = f(x) def m2(f:(Int,Int) => Int) = f(2,3) def m3(f:(Int,Int)=>Int,x:Int,y:Int) ..._scala的知识点