Function: -replace-at

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

Signature

(-replace-at N X LIST)

Documentation

Return a list with element at Nth position in LIST replaced with X.

See also: -replace

View in manual

Source Code

;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defun -replace-at (n x list)
  "Return a list with element at Nth position in LIST replaced with X.

See also: `-replace'"
  (declare (pure t) (side-effect-free t))
  (let ((split-list (-split-at n list)))
    (nconc (car split-list) (cons x (cdr (cadr split-list))))))