Use := instead of = so we're not re-interning a symbol in cl-loop

This commit is contained in:
2025-02-14 14:44:37 +00:00
parent a1a9ae008a
commit 8bd7900946
2 changed files with 2 additions and 2 deletions

View File

@@ -42,7 +42,7 @@ each member is STEP distance apart."
where key x in A has associations {y in LST : INDICATOR(y) = x}." where key x in A has associations {y in LST : INDICATOR(y) = x}."
(loop :with assoc-list := nil (loop :with assoc-list := nil
:for element :in lst :for element :in lst
:for key = (funcall indicator element) :for key := (funcall indicator element)
:if (assoc key assoc-list :test key-eq) :if (assoc key assoc-list :test key-eq)
:do (->> (alist-val key assoc-list) :do (->> (alist-val key assoc-list)
(cons element) (cons element)

View File

@@ -38,7 +38,7 @@ Also includes transformer where symbols are considered unary functions i.e.
nil nil
(let ((assignment-forms (let ((assignment-forms
(loop :for f :in forms (loop :for f :in forms
:for canon-f = (if (symbolp f) (list f 'lib.macros:_) f) :for canon-f := (if (symbolp f) (list f 'lib.macros:_) f)
:collect `(lib.macros:_ ,canon-f)))) :collect `(lib.macros:_ ,canon-f))))
`(let* ,assignment-forms `(let* ,assignment-forms
lib.macros:_)))) lib.macros:_))))