Breaking Changes:
- Factory functions (like
emptyImmutableArray
,immutableArrayOf
,buildImmutableArray
, etc.) have been moved
toImmutableArrayFactory.kt
to improve code organization
New Features:
- Add
flatMapIndexed
specializations - Add
flatMap
specializations - Add
partition
method - Add
asList
method - Add
MutableCollection.addAll(immutableArray)
extension function - Add
+
operator overload for concatenating an immutable array with an additional value - Add
+
operator overload for concatenating two immutable arrays - Add
count(predicate)
method - Add
none(predicate)
method - Add
any(predicate)
method - Add
all(predicate)
method
Performance Improvements:
- Reduce the memory usage of converting immutable arrays to lists by adding all the elements in a single step
- Return
EMPTY
singleton when converting an empty regular array to an immutable array - Immutable array builders: Avoid copying the backing array when the final size matches the array size