Improves the Arrays.Protocol
to be more friendly to implement. Specifically:
- Remove implementations for
Access.pop
. Instead, throw an error when people try to use it. - Similarly, throw an error when
:pop
is used insideAccess.get_and_update
- Move
empty
fromAccess.Behaviour
toAccess.Protocol
. - Alter handling of
:default
. It is no longer a required setting, and all arrays are able to work with adefault
passed toresize
. - Related to above: Replace
Arrays.Protocol.resize/2
withArrays.Protocol.resize/3
. (Arrays.resize/2
will call it withnil
as third parameter). size
is no longer a required setting.Arrays.new/2
andArrays.empty/1
have been edited to reflect this.
Improved tests, documentation, code examples.
Also, there now is some comprehensive benchmarking code that compares the various array implementations.