Skip to content

Commit d2f22ac

Browse files
authored
Refactor deduce-initial-value to use mapc
1 parent 03bd3f7 commit d2f22ac

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

code/utilities.lisp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,12 @@
135135
"" #P"")))
136136

137137
(defun deduce-initial-value (type)
138-
(loop for value in +initial-values+
139-
when (typep value type)
140-
do (return-from deduce-initial-value
141-
(values (coerce value type)
142-
t)))
138+
(mapc (lambda (value)
139+
(when (typep value type)
140+
(return-from deduce-initial-value
141+
(values (coerce value type)
142+
t))))
143+
+initial-values+)
143144
(if (consp type)
144145
(case (first type)
145146
((integer rational short-float single-float double-float long-float float real)

0 commit comments

Comments
 (0)