mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 08:04:45 +00:00
Merge branch 'main' of https://github.com/vitorpamplona/amethyst
This commit is contained in:
@@ -22,6 +22,14 @@ package com.vitorpamplona.amethyst.commons.utils
|
||||
|
||||
import kotlinx.collections.immutable.ImmutableList
|
||||
|
||||
/**
|
||||
* Compares two [ImmutableList] instances by element identity (`===`), not value equality (`==`).
|
||||
*
|
||||
* Returns `true` only when both lists have the same size and each element at the same index
|
||||
* is the exact same object reference.
|
||||
*
|
||||
* Useful for cheap change detection in UI/state pipelines where object identity is meaningful.
|
||||
*/
|
||||
fun <T> equalImmutableLists(
|
||||
list1: ImmutableList<T>,
|
||||
list2: ImmutableList<T>,
|
||||
|
||||
Reference in New Issue
Block a user