2021年4月27日星期二

Why this method currying can run in such a way

I have confused about the code below. Why this can run? And what is the meaning of the .isEmpty. In the process of calling test, and I am mysterious about the { means what? A new Function?

def test(age:Int)(name:name_class => name_class): String = {    val str: String = name.toString()+age+""    print(str)    str  }  test(19){    x =>      name_class("dage1")  }.isEmpty  
https://stackoverflow.com/questions/67262158/why-this-method-currying-can-run-in-such-a-way April 26, 2021 at 03:02PM

没有评论:

发表评论