Fix ensuref return value for subsequent runs
author |
Steve Losh <steve@stevelosh.com> |
date |
Fri, 10 Mar 2023 12:47:23 -0500 |
parents |
65478981d36d
|
children |
04ad2212b90f
|
branches/tags |
(none) |
files |
src/mutation.lisp |
Changes
--- a/src/mutation.lisp Wed Mar 01 21:12:34 2023 -0500
+++ b/src/mutation.lisp Fri Mar 10 12:47:23 2023 -0500
@@ -91,9 +91,8 @@
(multiple-value-bind (temps exprs stores store-expr access-expr)
(get-setf-expansion place env)
`(let* (,@(mapcar #'list temps exprs))
- (unless ,access-expr
- (let ((,(car stores) ,expr))
- ,store-expr))))))
+ (or ,access-expr (let ((,(car stores) ,expr))
+ ,store-expr))))))
(defmacro ensuref (&rest place-expr-pairs &environment env)
"Set each `place` that is currently `NIL` to its corresponding `expr`.