Prefer variadic cycle/new
TODO: Ensure all */new functions in my Elisp library share this API.
This commit is contained in:
parent
837a74f10f
commit
d13e347b9f
1 changed files with 2 additions and 2 deletions
|
@ -26,10 +26,10 @@
|
||||||
;; `xs' is the original list
|
;; `xs' is the original list
|
||||||
(cl-defstruct cycle current-index xs)
|
(cl-defstruct cycle current-index xs)
|
||||||
|
|
||||||
(defun cycle/new ()
|
(defun cycle/new (&rest xs)
|
||||||
"Create an empty cycle."
|
"Create an empty cycle."
|
||||||
(make-cycle :current-index 0
|
(make-cycle :current-index 0
|
||||||
:xs '()))
|
:xs xs))
|
||||||
|
|
||||||
(defun cycle/from-list (xs)
|
(defun cycle/from-list (xs)
|
||||||
"Create a cycle from a list of `XS'."
|
"Create a cycle from a list of `XS'."
|
||||||
|
|
Loading…
Reference in a new issue