Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fun main(args: Array<String>) {
- println(sum(1, 3)) // 4
- }
- fun sum(a: Int, b: Int) = higherOrderFunction2().let {
- it(a, b)
- }
- fun higherOrderFunction2(): (Int, Int) -> Int {
- return { a, b -> a + b }
- }
Add Comment
Please, Sign In to add comment