# Using Kotlin Generics, Extension Functions, and Lambdas to Build Readable Functions

DevFeed: [Using Kotlin Generics, Extension Functions, and Lambdas to Build Readable Functions](<https://devfeed.tech/articles/ninja-functions-in-kotlin-understanding-the-power-of-generics-kad-12-27169.md>)

Original publisher: [Read original article](<https://antonioleiva.com/generic-functions-kotlin>)

Published: 2017-02-08T00:00:00Z

Content type: tutorial

Language: en

Sources: [Antonio Leiva](<https://devfeed.tech/sources/antonio-leiva.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [generics](<https://devfeed.tech/topics/generics.md>), [Code](<https://devfeed.tech/topics/code.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [extension-function](<https://devfeed.tech/tags/extension-function.md>), [function](<https://devfeed.tech/tags/function.md>), [generics](<https://devfeed.tech/tags/generics.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [lambda](<https://devfeed.tech/tags/lambda.md>), [library](<https://devfeed.tech/tags/library.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>)

## AI overview

This tutorial explains how Kotlin's with function, extension functions, lambdas with receivers, and generic types can simplify code while preserving readability. It shows how to generalize a function for different data types and return a constructed value for builder-style usage.

## Source excerpt

Everything Android, Kotlin and other random topics