Finally, you can use this package to safely mutate collections, as well as accessing them safely as always!
All existing accessors now have mutating companions:
[orNil:]
taking an index can now set that index, remove that element by setting it tonil
, or do nothing if that index lies outside the collection[orNil:]
taking an index range can now set that range to the contents of a subsequence, remove the elements at that range by setting it tonil
, or do nothing if that index range goes beyond the collection boundaries[clamping:]
taking an index can now set that index, remove that element by setting it tonil
, or set the closest slot if the index lies outside the collection, or do nothing if the collection is empty
2.2.1
This patch fixes a crash when using this package to address strings and other collections which don't allow you to get an index if it's outside the collection
2.2.2
This patch adds a license to the codebase