From 8ea37e94836473f0c69af94aac2aa2d403599d0b Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Sun, 10 Jul 2022 13:14:04 -0500 Subject: [api change] for >> and ?> macros --- hyperquirks.lisp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'hyperquirks.lisp') diff --git a/hyperquirks.lisp b/hyperquirks.lisp index 2c7de1a..dd65b4f 100644 --- a/hyperquirks.lisp +++ b/hyperquirks.lisp @@ -54,8 +54,8 @@ returned from. (expander (rest body))))))) `(block () ,@(expander body)))) -(defmacro >> ((ob) &rest accessors) - "Chain access to OB. " +(defmacro >> (ob &rest accessors) + "Chain access to OB." (let* ((tmpvar (gensym)) (block-name @@ -71,17 +71,17 @@ returned from. ,@body)))) -(defmacro ?> ((ob &optional default (test 'null)) &rest accessors) +(defmacro ?> ((&key default (test 'null)) ob &rest accessors) "Chain access to OB, returning DEFAULT the first time TEST returns null. E.g. > (let ((num-tree '(1 (2 3 (4 5) 6)))) - (?> (num-tree) second third fourth)) + (?> num-tree second third fourth)) NIL > (let ((num-tree '(1 (2 3 (4 5) 6)))) - (?> (num-tree) second third first)) + (?> num-tree second third first)) 4 " (let* ((tmpvar -- cgit v1.2.3