Functional Programming, Simplified (Kotlin version)