好久没动过博客可,冒个泡,表示还存在。。。。






scala> def f1(a:Int)(b:Int): Int = {

     |         var c=a+2

     |         c+b

     |     }

f1: (a: Int)(b: Int)Int




scala> def test(s:Int,f:(Int => Int)): Unit ={

     |         println(f(s))

     |     }

test: (s: Int, f: Int => Int)Unit




scala> f1(1)(4)

res11: Int = 7




scala> test(4,f1(1))

7


有点意思。

友情链接
KaDraw流程图
API参考文档
OK工具箱
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:637538335
关注微信