# Build function chains using composition in Kotlin

DevFeed: [Build function chains using composition in Kotlin](<https://devfeed.tech/articles/build-function-chains-using-composition-in-kotlin-28373.md>)

Original publisher: [Read original article](<https://siddroid.com/post/kotlin/build-function-chains-using-composition-in-kotlin/>)

Author: Siddhesh Patil

Published: 2021-08-24T06:36:12Z

Content type: tutorial

Language: en

Sources: [Sid Patil - Android Engineer and Kotlin Advocate](<https://devfeed.tech/sources/sid-patil-android-engineer-and-kotlin-advocate.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Compose](<https://devfeed.tech/topics/compose.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compositional-patterns](<https://devfeed.tech/tags/compositional-patterns.md>), [extension-function](<https://devfeed.tech/tags/extension-function.md>), [functional-chaining](<https://devfeed.tech/tags/functional-chaining.md>), [higher-order-logic-kotlin](<https://devfeed.tech/tags/higher-order-logic-kotlin.md>), [inheritance-vs-composition](<https://devfeed.tech/tags/inheritance-vs-composition.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-articles-by-sid-patil](<https://devfeed.tech/tags/kotlin-articles-by-sid-patil.md>), [kotlin-fold-and-reduce-functions](<https://devfeed.tech/tags/kotlin-fold-and-reduce-functions.md>), [kotlin-functions](<https://devfeed.tech/tags/kotlin-functions.md>), [modifiers](<https://devfeed.tech/tags/modifiers.md>), [patterns](<https://devfeed.tech/tags/patterns.md>)

## AI overview

A Kotlin tutorial explains function chaining through compositional patterns and aggregation with fold functions. It uses Jetpack Compose's Modifier system on Android as a reference and demonstrates how to build a similar chaining system.

## Source excerpt

Leverage Kotlin fold aggregating operators to build function chains with compositional patterns. Learn how you can build a system similar to compose UIs Modifier logic on Android