为什么是一个等于号?
Scala把主体之前的部分包含等于号作为函数定义,而一个函数在函数式编程中永远都有返回值。
Scala regards a method with the equals sign before the body as a function definition and a function always returns a value in functional programming.
使用单等于号来向变量赋值,而不是像在前一个条件中那样使用双等于号 (==) 来比较值。
Use the single equal sign to assign a value to a variable, unlike the double equal sign (==), as in the previous condition, which compare the values.
使用单等于号来向变量赋值,而不是像在前一个条件中那样使用双等于号 (==) 来比较值。
Use the single equal sign to assign a value to a variable, unlike the double equal sign (==), as in the previous condition, which compare the values.
应用推荐