Skip to content

2.2 - Mutation! 🎉

Latest
Compare
Choose a tag to compare
@KyLeggiero KyLeggiero released this 10 Jun 19:32
a2a2f87

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 to nil, 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 to nil, 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 to nil, 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