Tag: Functional Programming

Lambda-Map Performance in Kotlin

Working on an enterprise application written in Kotlin, I’ve recently noticed something that felt “off” to me. Perhaps you’ve seen it, perhaps you’ve written it — maybe even recently!  It looks something like this (I call this a Lambda-Map): Sure, this plusOne function isn’t really necessary. We can just inline it in the Lambda, but imagine… Read more »

Sequence – A Kotlin Type

Kotlin, despite being an object oriented language, offers a ton of support for Functional paradigms. One of the most common functional paradigms involves using a combination of map, filter, and reduce on Iterable types. However, Kotlin uses extension functions on Java Collections to create these functions in their standard library. That means that when you call… Read more »