[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Replies to Extension to MAP
Thanks for the replies to my suggestion that MAP be extended to
take a first arg of a sequence which would be FILLed with the results
of the MAPping.
Moon is right that a first arg of () would be ambiguous since it
could be interpreted either as a zero-length sequence, or NIL specifying
to do the mapping but return no results.
Kerns and Margolin are right that a first arg such as (ARRAY T)
would also be ambiguous because it could be interpreted either as a
sequence to be filled or as a type specifier for a new sequence.
Kerns seems to be right that these are fatal flaws, the essential
problem being that some sequences already have meaning as the first arg
MAP. The feature would be nice to have but at the moment I can't see
any way to overcome this problem (which I really shouldn't have had to
have pointed out to me).
Vrotney misinterpreted what I was intending the extension to accomplish.
What he suggests can be achieved without much extra trouble by saying
(MAP (TYPE-OF seq) FN ... ), especially if TYPE-OF is as specific as