From aa9b248cc07cb3a41fc7ec27941bf1ac9720dc5f Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 29 Jun 2024 09:58:36 -0700 Subject: Fix: initargs --- def.lisp | 7 ++++++- util.lisp | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/def.lisp b/def.lisp index aea5bb9..4b0e613 100644 --- a/def.lisp +++ b/def.lisp @@ -89,7 +89,10 @@ E.g. (parse-class-options (kwargs) (loop :for (key val . more) :on kwargs :by #'cddr - :collect (list key val)))) + :if (listp val) + :collect (cons key val) + :else + :collect (list key val)))) (let* ((slot-defs (loop :for expr :in slots-and-options :while (listp expr) @@ -144,3 +147,5 @@ E.g. (values ,return-type) (optimize (speed 3) (safety 0))) ,@(if docstring (rest body) body))))) + + diff --git a/util.lisp b/util.lisp index 3008865..4c13d19 100644 --- a/util.lisp +++ b/util.lisp @@ -1,6 +1,5 @@ (in-package #:def) - (defun take-until (pred list) "Returns two values: FRONT BACK. -- cgit v1.2.3