Scala语言特性 变量的值可变的,但是变量类型是不可改变的; 常量的值是不可改变的; 常量的类型是显示声明的; Scala语言特性 Supports lightweight syntax for anonymous functions, higher-order functions, nested functions, currying Support for regular expression patterns Scala语言特性 匿名函数 lambda: 函数字面量(Function literal) 产生一段匿名函数,类型为(Int,Int)=Int Scala语言特性 高阶函数(Higher-Order Function)就是操作其他函数的函数。 The basic syntax of a function literal is parameter_list = function_body A higher-order function is one that takes a function as a parameter, or returns a function as a result scala Scala is great!.toList.count((ch: Char) = ch f) res36: Int = 9 scala a
原创力文档

文档评论(0)