Lisp refactoring puzzle

Neil Cerutti neilc at norwich.edu
Tue Jul 12 21:44:33 CEST 2011


On 2011-07-12, Petter Gustad <newsmailcomp6 at gustad.com> wrote:
> Xah Lee <xahlee at gmail.com> writes:
>
>> it's funny, in all these supposedly modern high-level langs, they
>> don't provide even simple list manipulation functions such as union,
>> intersection, and the like. Not in perl, not in python, not in lisps.
>
> In Common Lisp you have:
>
> CL-USER> (union '(a b c) '(b c d))
> (A B C D)
> CL-USER> (intersection '(a b c) '(b c d))
> (C B)

What's the rationale for providing them? Are the definitions
obvious for collections that a not sets?

-- 
Neil Cerutti



More information about the Python-list mailing list