summaryrefslogtreecommitdiff
path: root/hyperquirks.lisp
diff options
context:
space:
mode:
authorColin Okay <okay@toyful.space>2022-07-10 13:14:04 -0500
committerColin Okay <okay@toyful.space>2022-07-10 13:14:04 -0500
commit8ea37e94836473f0c69af94aac2aa2d403599d0b (patch)
treea1ba5326b553c6cc56a1cf1583a14cdb578ffa4c /hyperquirks.lisp
parent81f246cca5924dfe93aa19ac0ca8d8824e3d9210 (diff)
[api change] for >> and ?> macros
Diffstat (limited to 'hyperquirks.lisp')
-rw-r--r--hyperquirks.lisp10
1 files changed, 5 insertions, 5 deletions
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