Fix out of line mapcan/mapcon on functions returning atoms.
commite18039ff3c1ab29daed2830022513a1e0c055370
authorStas Boukarev <stassats@gmail.com>
Sun, 30 Aug 2015 20:39:16 +0000 (30 23:39 +0300)
committerStas Boukarev <stassats@gmail.com>
Sun, 30 Aug 2015 20:39:16 +0000 (30 23:39 +0300)
tree7f881e67628995fb58dd32e254fa6916e698683a
parent4bc676e3333d608e4e8977d7704b5d08f3a727e4
Fix out of line mapcan/mapcon on functions returning atoms.

It is said that MAPCON is equivalent to (apply #'nconc (maplist ...))
which means (nconc 1) would return 1, but (nconc 1 1) should signal an
error. The transformed MAP code returns the last result, do that here
as well for consistency and simplicity.
src/code/list.lisp
tests/map-tests.impure.lisp