Function: map-into

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

Signature

(map-into MAP TYPE)

Documentation

Convert MAP into a map of TYPE.

Other relevant functions are documented in the map group.

Shortdoc

;; map
(map-into #s(hash-table data (quote (5 6 7 8))) 'list)
    => ((quote 5 6 7 8))
  (map-into '((5 . 6) (7 . 8)) 'plist)
    => (5 6 7 8)
  (map-into '((5 . 6) (7 . 8)) 'hash-table)
    => #s(hash-table test equal data (5 6 7 8))

Implementations

(map-into MAP (TYPE (head hash-table))) in `map.el'.

Implementation of `map-into' for TYPE that is hash-table with keywords. Convert MAP into a hash-table. TYPE is a list whose car is `hash-table' and cdr a list of keyword-args forwarded to `make-hash-table'.

Example: (map-into '((1 . 3)) '(hash-table :test eql))

(map-into MAP (TYPE (eql hash-table))) in `map.el'.

Implementation of `map-into' for TYPE that is hash-table. Convert MAP into a hash-table with keys compared with `equal'.

(map-into MAP (TYPE (eql plist))) in `map.el'.

Implementation of `map-into' for TYPE that is plist. Convert MAP into a plist, with property names serving as keys and property values as values.

(map-into MAP (TYPE (eql alist))) in `map.el'.

Implementation of `map-into' for TYPE that is alist. Convert MAP into an alist, with the `car' of each association cons cell serving as keys and the `cdr' as values.

(map-into MAP (TYPE (eql list))) in `map.el'.

Implementation of `map-into' for TYPE that is list. Convert MAP into an alist.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/map.el.gz
(cl-defgeneric map-into (map type)
  "Convert MAP into a map of TYPE.")