Skip to content

Commit

Permalink
Bug fix: local definition for car-safe.
Browse files Browse the repository at this point in the history
The real definition of car-safe is at a higher level.

See #55.
  • Loading branch information
ruricolist committed Mar 30, 2020
1 parent 6aba6d5 commit 9c5139e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions defining-types.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ raises an error is supplied."
,@args))))))

(defun include+opts (opts)
(if-let (clause (find :include opts :key #'car-safe))
(values clause (remove clause opts))
(values nil opts)))
(flet ((car-safe (x) (if (consp x) (car x) x)))
(if-let (clause (find :include opts :key #'car-safe))
(values clause (remove clause opts))
(values nil opts))))

(defmacro defstruct-read-only (name-and-opts &body slots
&environment env)
Expand Down

0 comments on commit 9c5139e

Please sign in to comment.