Merge pull request #30 from shosti/insert-at-opt

Small optimization for -insert-at
master
Magnar Sveen 13 years ago
commit 8f9fca36b1
  1. 2
      dash.el

@ -414,7 +414,7 @@ FROM or TO may be negative."
(defun -insert-at (n x list)
"Returns a list with X inserted into LIST at position N."
(let ((split-list (-split-at n list)))
(append (car split-list) (cons x (cadr split-list)))))
(nconc (car split-list) (cons x (cadr split-list)))))
(defmacro --split-with (pred list)
"Anaphoric form of `-split-with'."

Loading…
Cancel
Save