Guest User

Untitled

a guest
May 25th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. fun main(args: Array<String>) {
  2. println(sum(1, 3)) // 4
  3. }
  4.  
  5. fun sum(a: Int, b: Int) = higherOrderFunction2().let {
  6. it(a, b)
  7. }
  8.  
  9. fun higherOrderFunction2(): (Int, Int) -> Int {
  10. return { a, b -> a + b }
  11. }
Add Comment
Please, Sign In to add comment