Function: map-length
map-length is a byte-compiled function defined in map.el.gz.
Signature
(map-length MAP)
Documentation
Return the number of key/value pairs in MAP.
Note that this does not always reflect the number of unique keys.
The default implementation delegates to map-do.
Implementations
(map-length (MAP array)) in `map.el'.
Undocumented
(map-length (MAP list)) in `map.el'.
Undocumented
(map-length (MAP hash-table)) in `map.el'.
Undocumented
(map-length MAP) in `map.el'.
Undocumented
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/map.el.gz
(cl-defgeneric map-length (map)
;; FIXME: Should we rename this to `map-size'?
"Return the number of key/value pairs in MAP.
Note that this does not always reflect the number of unique keys.
The default implementation delegates to `map-do'."
(let ((size 0))
(map-do (lambda (_k _v) (setq size (1+ size))) map)
size))