Clarify keywords in loop macro
This commit is contained in:
parent
7d24252899
commit
7d94d02f42
2 changed files with 11 additions and 11 deletions
|
@ -136,13 +136,13 @@
|
|||
(values (make-attrs :alist (asu:hash-alist (first attrs-and-children)))
|
||||
(flatten (rest attrs-and-children))))
|
||||
((keywordp (first attrs-and-children)) ;inline-plist
|
||||
(loop for thing on attrs-and-children by #'cddr
|
||||
for (k v) = thing
|
||||
when (and (keywordp k) v)
|
||||
collect (cons k v) into attrs
|
||||
when (not (keywordp k))
|
||||
return (values (make-attrs :alist attrs) (flatten thing))
|
||||
finally (return (values (make-attrs :alist attrs) nil))))
|
||||
(loop :for thing :on attrs-and-children :by #'cddr
|
||||
:for (k v) := thing
|
||||
:when (and (keywordp k) v)
|
||||
:collect (cons k v) :into attrs
|
||||
:when (not (keywordp k))
|
||||
:return (values (make-attrs :alist attrs) (flatten thing))
|
||||
:finally (return (values (make-attrs :alist attrs) nil))))
|
||||
(t
|
||||
(values (make-attrs :alist nil) (flatten attrs-and-children)))))
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
(if (stringp string)
|
||||
(with-output-to-string (s)
|
||||
(loop
|
||||
for c across string
|
||||
do (write (escape-char c escape-map)
|
||||
:for c :across string
|
||||
:do (write (escape-char c escape-map)
|
||||
:stream s :escape nil)))
|
||||
string))
|
||||
|
||||
|
|
Loading…
Reference in a new issue