Raphael De LioinKotlin with Raphael De LioKotlin Tip #42: Use fold and reduce for Aggregating Collection Values — 100 Kotlin Tips in 100 DaysAt first look, “fold” and “reduce” might look the same because both are ways to combine values in a collection. But, the difference is in…2 min read·Mar 28, 2024----
Raphael De LioinKotlin with Raphael De LioKotlin Tip #41: Make use of the first, last, and find methods for retrieving elements — 100 Kotlin…Twitter | LinkedIn | YouTube | Instagram Tip #40: Use sortBy and sortedBy for Collection Sorting2 min read·Mar 24, 2024----
Raphael De LioinKotlin with Raphael De LioKotlin Tip #40: Explore the distinct and distinctBy for removing duplicates from collectionsTwitter | LinkedIn | YouTube | Instagram Tip #39: Use sortBy and sortedBy for Collection Sorting2 min read·Mar 23, 2024----
Raphael De LioinKotlin with Raphael De LioKotlin Tip #39: Use sortBy and sortedBy for Collection Sorting — 100 Kotlin Tips in 100 DaysBoth sortBy and sortedBy are extension functions that Kotlin offers for sorting collections. While they serve similar purposes, their…3 min read·Mar 22, 2024----
Raphael De LioinKotlin with Raphael De LioKotlin Tip #38: Use groupBy to Organize Collections by Criteria — 100 Kotlin Tips in 100 DaysThe groupBy function segregates a collection into a map, where each key represents a unique criterion, and the corresponding value is a…2 min read·Mar 21, 2024----
Raphael De LioinKotlin with Raphael De LioKotlin Tip #37: Transforming Collections with map and flatMap — 100 Kotlin Tips in 100 DaysThe map function applies a given transformation to each element in a collection, returning a list containing the results of these…2 min read·Mar 18, 2024----
Raphael De LioinKotlin with Raphael De LioKotlin Tip #36: Use filter and filterNot to Collection filtering — 100 Kotlin Tips in 100 DaysThe filter function allows you to specify a condition (a predicate) and returns a new collection containing only the elements that satisfy…2 min read·Mar 17, 2024----
Raphael De LioinKotlin with Raphael De LioKotlin Tip #35: Use Tailrec for Efficient Recursion — 100 Kotlin Tips in 100 DaysWhen you mark a recursive function with the tailrec modifier, you’re giving the Kotlin compiler permission to optimize the function if…4 min read·Mar 16, 2024----
Raphael De LioinKotlin with Raphael De LioKotlin Tip #34: Prefer Inline Classes for Wrapping Primitive Types — 100 Kotlin Tips in 100 DaysAn inline class in Kotlin is defined using the inline keyword before the class declaration. Its primary purpose is to wrap another type. At2 min read·Mar 14, 2024--1--1
Raphael De LioinKotlin with Raphael De LioKotlin Tip #33: Using Delegation to Enhance Classes Without Inheritance — 100 Kotlin Tips in 100…Lazy initialization is a design pattern that delays the creation of an object, the calculation of a value, or some other expensive process…2 min read·Mar 13, 2024----