Fix result sequence creation in SEQUENCE:MAP
commitb7bdbc4d0db836b56a588d83c5da1f3ef6e42f3e
authorJan Moringen <jmoringe@techfak.uni-bielefeld.de>
Wed, 9 Mar 2016 11:47:05 +0000 (9 12:47 +0100)
committerJan Moringen <jmoringe@techfak.uni-bielefeld.de>
Wed, 9 Mar 2016 20:17:24 +0000 (9 21:17 +0100)
treec7cb90554bda20f0e55386df40e07aeda0322555
parent5b1da7212e9be4859e8688716b48ab1615c242e8
Fix result sequence creation in SEQUENCE:MAP

It passed (class-of result-prototype) to MAKE-SEQUENCE which, in the
best case, would go back to the prototype of the class and call
SEQUENCE:MAKE-SEQUENCE-LIKE on it.

All subtype queries and whatnot performed by MAKE-SEQUENCE before
finally calling SEQUENCE:MAKE-SEQUENCE-LIKE are unnecessary in the
common case of SEQUENCE:MAP being called from MAP in which case the
result type is an extended sequence.

Instead, directly call SEQUENCE:MAKE-SEQUENCE-LIKE on RESULT-PROTOTYPE.

This is what SEQUENCE:{CONCATENATE,MERGE} already do.
src/pcl/sequence.lisp
tests/extended-sequences.impure.lisp