[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MAPing Sequences
> It has not been established that it is a bug for sequence functions not
> to handle circular lists. There seems to be strong sentiment on both
> sides of this issue, and there is no clear statement on this in the
> manual. At some point the standardization committee will have to make a
> decision one way or the other.
Calling it a Bug was my own opinion. I should more careful, and I aplogize
for any confusion.
> If it were up to me (which it isn't) it would be an error to pass a
> circular list to any function that does not explicitly allow circular
> lists. I don't think the extra cost of handling this style is justified
> for most functions. Sequences should be finite.
> -- Scott
Extra cost for what? Using lists as sequences?
LENGTH and ELT are not constant-time operations on lists. AT LEAST FOR
THE MAPPING FUNCTIONS, it is a poor implementation which forces
every cons of a list to be looked at (paged in)
if they will never be used by the function since some other sequence
is shorter. It is equally poor to scan the first N-1 elements of
a list every time to get the Nth. Whether sequences can be
infinite or not, an inefficient implementation technique that doesn't
support them seems like a poor reason to not allow them.
Kelly Murray