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

Re: remove



In article <HALTRAET.92Nov20091121@monsun.si.no> Hallvard Tr{tteberg,
haltraet@monsun.si.no writes:
>It shouldn't be difficult to write one that kept the biggest unchanged
>tail of the original list, returning the whole unmodified list if it
>didn't contain the first argument.

On the other hand, Common Lisp, the Manual, states that "the result [of 
remove] is a copy of the input sequence." If you return part of the 
original list, then you change the contract of the function. Sometimes 
one uses remove and requires a totally new list. One must be careful 
about "efficiency".

Tim Larkin
Federal Nutrition Laboratory
Tower Road
Ithaca, New York
tsl1@cornell.edu
607-255-7008