Function: dash--normalize-let-varlist

dash--normalize-let-varlist is a byte-compiled function defined in dash.el.

Signature

(dash--normalize-let-varlist VARLIST)

Documentation

Normalize VARLIST so that every binding is a list.

let allows specifying a binding which is not a list but simply the place which is then automatically bound to nil, such that all three of the following are identical and evaluate to nil.

  (let (a) a)
  (let ((a)) a)
  (let ((a nil)) a)

This function normalizes all of these to the last form.

Source Code

;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defun dash--normalize-let-varlist (varlist)
  "Normalize VARLIST so that every binding is a list.

`let' allows specifying a binding which is not a list but simply
the place which is then automatically bound to nil, such that all
three of the following are identical and evaluate to nil.

  (let (a) a)
  (let ((a)) a)
  (let ((a nil)) a)

This function normalizes all of these to the last form."
  (--map (if (consp it) it (list it nil)) varlist))