Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 432 Bytes

kotlin.md

File metadata and controls

24 lines (18 loc) · 432 Bytes

Kotlin

The ROOT way

Contributed by: Dautomne_

This is the way everyone in the Programmer Nullposting group says is the best.

fun isEven(num : Int) : Boolean {
    return num % 2 == 0
}

The NUTELLA way

Contributed by: Dautomne_

Because I like nuteLla.

fun main() {
    val isEven = { x: Int -> x % 2 == 0 }
    println(isEven(2))
}