Add Access.values/0 for traversing maps and keyword lists values
Module
Access
15 changes across 12 versions
Changes by version
Add Access.find/1 that mirrors Enum.find/2
Add Access.slice/1
Add Access.at!/1
Allow Access.at/1 to handle negative index
Optimize Access.get/2
Do not accept nils in Access.key/1 and Access.key/2 in favor of explicit default values (or Access.key!/1 if you expect the key to always be available)
Access.key/1 is deprecated due to erratic behaviour for missing keys, please use Access.key/2 instead with proper default values
Add support for Access.all/0, Access.elem/1, Access.key/2 and Access.key!/1 for traversing nested data structures
Improve error messages when using Access on non-valid key-value structures
Implementing the Access protocol is deprecated. The Access protocol relies on the code server in development and test mode (when protocol consolidation is not applied) and it generated a bottleneck when working with multiple processes and the Access protocol was invoked hundreds of times (which is not uncommon). Note the Access module and the opts[key] syntax are not affected and they are not deprecated, only the underlying protocol dispatch
Allow function access on get_in/2 and get_and_update_in/3
No longer fill in missing intermediate values with empty maps
Access.access/2 is deprecated in favor of Access.get/2
Kernel.access/2 no longer exists and the Access protocol now requires get/2 (instead of access/2) and get_and_update/3 to be implemented