函数中小括号和大括号效果是否一样
def greeting() = {name: String} => { s"Hello $name"}
//> greeting: ()String => String
greeting()("zhangsan") //> res1: String = Hello zhangsan
def greetings() = (name: String) => ("Hello"+" "+name)
//> greetings: ()String => String
greetings()("zhangsan") //> res2: String = Hello zhangsan
def greet() = (name: String) => {"Hello"+" "+name}
//> greet: ()String => String
greet(){"zhangsan"} //> res3: String = Hello zhangsan
def greets(age: Int) = {name: String} => {"Hello"+" "+name+age}
//> greets: (age: Int)String => String
greets(23){"zhangsan"} //> res4: String = Hello zhangsan23