[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Replies to Extension to MAP
- To: common-lisp@SAIL.STANFORD.EDU
- Subject: Replies to Extension to MAP
- From: VERACSD@A.ISI.EDU
- Date: Mon, 23 Mar 1987 18:45:00 -0000
- Cc: moon@SCRC-STONY-BROOK.ARPA
- Cc: rwk@SCRC-YUKON.ARPA
- Cc: barmar@THINK.COM
- Cc: vrotney@VENERA.ISI.EDU
- Cc: veracsd@A.ISI.EDU
- Cc: norvig%cogsci.berkeley.edu@UCBVAX.BERKELEY.EDU
- Sender: VERACSD@A.ISI.EDU
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