Kotlin’s High-Flying High-Order Functions

Alparslan Selçuk Develioğlu
Become Better
Published in
5 min readFeb 29, 2024

--

Click here to read the article if you’re not Medium Partner.

Since 2010, when Oracle acquired Sun Microsystems, there has been an ongoing Java war between Oracle and Google. Oracle filed a significant lawsuit against Google, accusing it of using Java’s non-free features without payment, and so on… You might know the story, I suppose there’s no need to recount it all. At the GoogleIO 2017 event, Kotlin was declared the official programming language by Google. Since that day, we, as Android developers, have been learning Kotlin.

You might have heard many Kotlin and Android enthusiasts, including myself, say, ‘Kotlin has functional language features.’ If you’re asking, ‘What are these functional language features? Give me an example, come on!’ then gather around. In this article, I will explain the use of high-level functions, one of Kotlin’s functional language features.

Image designed by Author on Canva

In the world of functional programming, functions get the VIP treatment — they’re considered just as crucial as other types like Strings or Integers. What’s cool is that you can actually pass functions around just like you would with a String or an Integer. This opens up possibilities where functions can receive other functions as parameters or even return them.

--

--

Alparslan Selçuk Develioğlu
Become Better

8+ years experienced Android Dev. Colorful, confident personality, a fan of science fiction and fantasy works. An Ultratrail runner who runs in races 60+ kms