Skip to content

athenian-programming/kotlin-lambdas

Repository files navigation

Kotlin Lambdas

This repo contains code snippets useful for understanding Kotlin lambdas.

Tutorials

Examples

Kotlin Lambda Example

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

Releases

No releases published

Packages

No packages published