Never miss a beat

Join my newsletter.

Tag: sequences

Sequence: A Kotlin Type

Published: 11/3/2018

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 map on a list, you’ll return a new list. This is usually intended, however, it can become problematic when chaining multiple…