© Ted Hagos 2018
Ted HagosLearn Android Studio 3 with Kotlinhttps://doi.org/10.1007/978-1-4842-3907-0_5

5. Lambdas and Higher Order Functions

Ted Hagos1 
(1)
Manila, National Capital Region, Philippines
 
What we’ll cover:
  • Higher order functions

  • Lambda

  • Closures

  • With and apply

In Chapter 2, we discussed the mechanics of Kotlin functions, and you’ve already seen how similar they are to Java functions; you’ve also seen how different they are. In this chapter, we’ll get back to the discussion of functions, but a different kind of function—the kind that supports functional programming. You may have used lambdas in Java 8; similarly, Kotlin also has support for lambdas. In this chapter, we’ll explore these two topics.

Higher Order Functions

Higher order functions ...

Get Learn Android Studio 3 with Kotlin: Efficient Android App Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.