From d13e347b9fe8cde051928c1ffa7f2dd97e0bc086 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Tue, 24 Dec 2019 12:29:00 +0000 Subject: Prefer variadic cycle/new TODO: Ensure all */new functions in my Elisp library share this API. --- configs/shared/.emacs.d/wpc/cycle.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/shared/.emacs.d/wpc/cycle.el b/configs/shared/.emacs.d/wpc/cycle.el index 762488887ddf..894626383049 100644 --- a/configs/shared/.emacs.d/wpc/cycle.el +++ b/configs/shared/.emacs.d/wpc/cycle.el @@ -26,10 +26,10 @@ ;; `xs' is the original list (cl-defstruct cycle current-index xs) -(defun cycle/new () +(defun cycle/new (&rest xs) "Create an empty cycle." (make-cycle :current-index 0 - :xs '())) + :xs xs)) (defun cycle/from-list (xs) "Create a cycle from a list of `XS'." -- cgit 1.4.1