How do i use lambda functions in kotlin?

Example:

list.forEach({ item -> println(item) })  // Over-complicated lambda usage
Solution:

list.forEach { println(it) }  // Simplified lambda usage in Kotlin
Kotlin offers a more concise syntax for lambdas. If a lambda has only one parameter, you can refer to it using the `it` keyword.

Beginner's Guide to Kotlin