Function: mapc
mapc is a function defined in fns.c.
Signature
(mapc FUNCTION SEQUENCE)
Documentation
Apply FUNCTION to each element of SEQUENCE for side effects only.
Unlike mapcar, don't accumulate the results. Return SEQUENCE.
SEQUENCE may be a list, a vector, a bool-vector, or a string.
Other relevant functions are documented in the vector and list groups.
Probably introduced at or before Emacs version 21.1.
Shortdoc
;; list
(mapc #'insert '("1" "2" "3"))
=> 123("1" "2" "3")
;; vector
(mapc #'insert ["1" "2" "3"])
=> 123["1" "2" "3"]
Aliases
mh-mapc (obsolete since 29.1)
Source Code
// Defined in /usr/src/emacs/src/fns.c
{
register EMACS_INT leni;
leni = XFIXNAT (Flength (sequence));
if (CHAR_TABLE_P (sequence))
wrong_type_argument (Qlistp, sequence);
mapcar1 (leni, 0, function, sequence);
return sequence;
}