This repo contains code snippets useful for understanding Kotlin lambdas.
students
.filter { it.passing && it.averageGrade > 3.5 } // Only passing students with high GPAs
.sortedByDescending { it.averageGrade } // Starting from ones with best grades
.take(10) // Take top 10
.sortedWith(compareBy({ it.surname }, { it.name })) // Sort by surname and then name