[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Extension to MAP



re:
--------------------------------------------------------------------------------
Subject: Extension to MAP
From: VERACSD@A.ISI.EDU
To: common-lisp@SAIL.STANFORD.EDU
Cc: veracsd.rs@A.ISI.EDU
Message-Id: <[A.ISI.EDU]20-Mar-87 16:24:21.VERACSD>


     I'd really like to see MAP take a sequence as its first
argument, and have the results be put into that sequence.
--------------------------------------------------------------------------------

This sounds like a good idea but your syntax might have problems.  For
example , a type specifier that is a subtype of type sequence might be
(I can't show this) a list (CLTT p42) which is itself a sequence.

One way to implement your idea would be to extend CLTL as follows:

CLTL states that the first argument to MAP must be NIL or a subtype of
sequence.  Propose we extend so that if the first argument is anything
else then the result  type is of the type of the  first  sequence.  In
particular,

	(map t function seq1 ...) => <sequence of type seq1>

would give you your desired effect.

Bill Vrotney USC/ISI
-------