fun checkforSimpleFunctional(p:Int, q:Int, test : (Int, Int) -> Double):Double{
return test(p, q)
}
println(checkforSimpleFunctional(2, 3){ a, b -> (a + b).toDouble() })

'Programming Theory > Functional Programming' 카테고리의 다른 글
| 기본 예제 - Scala (0) | 2020.12.05 |
|---|
