Function: -list

-list is a byte-compiled function defined in dash.el.

Signature

(-list ARG)

Documentation

Ensure ARG is a list.

If ARG is already a list, return it as is (not a copy). Otherwise, return a new list with ARG as its only element.

Another supported calling convention is (-list &rest ARGS). In this case, if ARG is not a list, a new list with all of ARGS as elements is returned. This use is supported for backward compatibility and is otherwise deprecated.

View in manual

Source Code

;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defun -list (&optional arg &rest args)
  "Ensure ARG is a list.
If ARG is already a list, return it as is (not a copy).
Otherwise, return a new list with ARG as its only element.

Another supported calling convention is (-list &rest ARGS).
In this case, if ARG is not a list, a new list with all of
ARGS as elements is returned.  This use is supported for
backward compatibility and is otherwise deprecated."
  (declare (advertised-calling-convention (arg) "2.18.0")
           (pure t) (side-effect-free error-free))
  (if (listp arg) arg (cons arg args)))