composewell / streamly

High performance, concurrent functional programming abstractions
https://streamly.composewell.com
Other
859 stars 65 forks source link

Provide a rightSize API for immutable arrays #2723

Open harendra-kumar opened 7 months ago

harendra-kumar commented 7 months ago

If an immutable array is a slice over a bigger array, only then, we can copy out the slice into a new array.

This is an alternative for the clone and pinnedClone APIs.