athenian-programming / kotlin-lambdas

Kotlin Lambda Examples

Repository from Github https://github.comathenian-programming/kotlin-lambdasRepository from Github https://github.comathenian-programming/kotlin-lambdas

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

About

Kotlin Lambda Examples

License:Apache License 2.0


Languages

Language:Kotlin 97.2%Language:Makefile 2.8%