Function: -replace-last

-replace-last is a byte-compiled function defined in dash.el.

Signature

(-replace-last OLD NEW LIST)

Documentation

Replace the last occurrence of OLD with NEW in LIST.

Elements are compared using equal.

See also: -map-last

View in manual

Source Code

;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defun -replace-last (old new list)
  "Replace the last occurrence of OLD with NEW in LIST.

Elements are compared using `equal'.

See also: `-map-last'"
  (declare (pure t) (side-effect-free t))
  (--map-last (equal old it) new list))