Function: -cycle

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

Signature

(-cycle LIST)

Documentation

Return an infinite circular copy of LIST.

The returned list cycles through the elements of LIST and repeats from the beginning.

View in manual

Source Code

;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defun -cycle (list)
  "Return an infinite circular copy of LIST.
The returned list cycles through the elements of LIST and repeats
from the beginning."
  (declare (side-effect-free t))
  ;; Also works with sequences that aren't lists.
  (let ((newlist (append list ())))
    (nconc newlist newlist)))