Commit eedbbc08 authored by Marius Gerbershagen's avatar Marius Gerbershagen
Browse files

cmp: add type checks in mapl/maplist/mapcon compiler-macros

We are transforming these functions into (loop :on ...). This simply
stops when the objects which we are looping on is not a list, but we
need to signal a type-error because the mapping functions are
specified to take only lists.
parent e0813bf4
......@@ -45,6 +45,8 @@
(MAPL (setf in-or-on :ON do-or-collect :DO))
(MAPCAN (setf do-or-collect 'NCONC))
(MAPCON (setf in-or-on :ON do-or-collect 'NCONC)))
(when (eq in-or-on :ON)
(setf args (mapcar #'(lambda (arg) `(checked-value list ,arg)) args)))
(when (eq do-or-collect :DO)
(let ((var (gensym)))
(setf list-1-form `(with ,var = ,(first args))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment