Case study of a simple Kotlin Lambda function

In the previous section, we had a look at a simple Lambda function written in Java. Java is much more than a language. It includes the JVM, which is the execution environment that executes the compiled bytecode. It includes libraries that can be compiled into bytecode and run on the JVM.

The Lambda Java 8 runtime also executes functions written in Kotlin and Groovy among other languages, which get compiled to bytecode. So, a Lambda function can be authored in any of the languages that run on the JVM. In this section of the book, you'll take a look at Lambda functions created in Kotlin.

Get Hands-On Serverless Applications with Kotlin 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.