2019独角兽企业重金招聘Python工程师标准>>> 作者: ganzhijie 发表于 2010-09-02 10:11 原文链接 阅读: 21 评论: 0 John F. Kennedy-“Ask not what your twitter can do for you, ask what you can do for your twitter.”肯尼迪总统-“不要问你的微博能为你做些什…
1.匿名函数 (x: Int) > x 1这一部分就是一个匿名函数,我这里使用了一个变量anonymousFun代替了这个匿名函数方便测试调用;>左边是参数和参数类型,而>右边是函数体,并没有函数名。
val anonymousFun (x: Int) > x …