We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Function在函数编程语言中是一等公民。 就是说Function可以像普通值一样被当参数传入或作为结果返回。
def sum(f: Int => Int): (Int, Int) => Int = (a: Int, b: Int) => if (b <= a) b + sum(b+1, a) else 0
There was an error while loading. Please reload this page.