(mapcan #'+ '(1 2 3 4 5)) ;=> 5
Bug #1577127 reported by
Michał "phoe" Herda
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Hey,
(mapcan #'+ '(1 2 3 4 5)) ;=> 5
According to the standard, this is equivalent to (apply #'nconc (mapcar #'+ '(1 2 3 4 5))), which throws an error.
Is this a bug in the standard, or the implementations? I've seen SBCL, CCL, ECL, CLISP all evaluate this to 5.
~phoe
To post a comment you must log in.
It's not easy to efficiently signal an error in that case, yet have
(mapcan #'+ '(1)) or (mapcan #'identity '(nil nil 1)) return 1.