Function: map-do

map-do is a byte-compiled function defined in map.el.gz.

Signature

(map-do FUNCTION MAP)

Documentation

Apply FUNCTION to each element of MAP and return nil.

FUNCTION is called with two arguments, the key and the value.

Other relevant functions are documented in the map group.

Shortdoc

;; map
(let ((map (list '(1 . 1) '(2 . 3)))
      acc)
  (map-do (lambda (k v) (push (+ k v) acc)) map)
  (nreverse acc))
    => (2 5)

Implementations

(map-do FUNCTION (MAP array)) in `map.el'.

Undocumented

(map-do FUNCTION (MAP list)) in `map.el'.

Undocumented

(map-do FUNCTION (MAP hash-table)) in `map.el'.

Undocumented

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/map.el.gz
(cl-defgeneric map-do (function map)
  "Apply FUNCTION to each element of MAP and return nil.
FUNCTION is called with two arguments, the key and the value.")