The epsilon-immutable module provides utility functions and extensions for working with Kotlinx Immutable Collections in a Kotlin Multiplatform environment.
This module is especially useful in state-driven UI architectures where immutable data structures help reduce accidental mutation.
Extensions to perform standard collection operations while maintaining the immutability of the result.
Example usage
val immutableList = persistentListOf(1, 2, 3)
val filtered = immutableList.filterToImmutable { it > 1 }Utilities to sort immutable collections and return a new immutable collection.
Add the dependency to your commonMain:
dependencies {
implementation("ag.sportradar.mobile.epsilon:epsilon-immutable:<version>")
}