Skip to content

Commit f43344e

Browse files
authored
Merge pull request #1 from eriedaberrie/fix-nreverse-in-macro
Avoid calling nreverse on macro argument
2 parents e61bb21 + 18d33e0 commit f43344e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/helpers.lisp

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
(let ((pack (gensym "PACK"))
1919
(value (gensym "VALUE")))
2020
`(let ((,pack nil) (,value ,bitwise))
21-
,@(mapcar (lambda (pair)
22-
`(when (plusp (logand ,(first pair) ,value))
23-
(push ',(second pair) ,pack)))
24-
(nreverse pairs))
21+
,@(nreverse (mapcar (lambda (pair)
22+
`(when (plusp (logand ,(first pair) ,value))
23+
(push ',(second pair) ,pack)))
24+
pairs))
2525
,pack)))
2626

2727
(defmacro pack-to-bitwise (packed &body pairs)

0 commit comments

Comments
 (0)