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…Mar 28Mar 28
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 SortingMar 24Mar 24
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 SortingMar 23Mar 23
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…Mar 22Mar 22
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…Mar 21Mar 21
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…Mar 18Mar 18
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…Mar 17Mar 17
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…Mar 16Mar 16
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. AtMar 141Mar 141
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…Mar 13Mar 13