Another library by the productive Nicolas Petton. map.el is a cousin to
seq.el (remember?), but instead of manipulating plain sequences, it
manipulates map-like collections (also known as dictionaries).
The range of functions should include everything you expect, from map-values
and map-keys to get a list of the values and keys (duh), to general getters
and setters like map-elt and map-put. Inside it, you’ll even find some
fancier stuff like map-let, map-values-apply, or map-nested-elt. For those
who know what that means, it also comes with a pcase macro!
Note that this library does not introduce a new data structure. It simply
provides a consistent and unified API for dealing with any map-like structure
you need. This applies to alists, hash-maps, and even vectors (it treats the
vector as a dictionary whose keys are all integers).
New in Emacs 25.1: map.el library
16 Feb 2016, by Artur Malabarba.New in 25.1 post series
Another library by the productive Nicolas Petton.
map.el
is a cousin toseq.el
(remember?), but instead of manipulating plain sequences, it manipulates map-like collections (also known as dictionaries).The range of functions should include everything you expect, from
map-values
andmap-keys
to get a list of the values and keys (duh), to general getters and setters likemap-elt
andmap-put
. Inside it, you’ll even find some fancier stuff likemap-let
,map-values-apply
, ormap-nested-elt
. For those who know what that means, it also comes with apcase
macro!Note that this library does not introduce a new data structure. It simply provides a consistent and unified API for dealing with any map-like structure you need. This applies to alists, hash-maps, and even vectors (it treats the vector as a dictionary whose keys are all integers).
Tags: emacs-25, emacs,
New in Emacs 25.1: More flow control macros »
« New in Emacs 25.1: EWW improvements
Related Posts
Emacs 25 is out! What are the new features and what were my predictions in emacs-25
New in Emacs 25.1: Archive priorities and downgrading packages in emacs-25
New in Emacs 25.1: Filtering by status and archive in emacs-25
Content © 2019, All rights reserved. Icons under CC3.0.