Petter Gustad wrote:
> Xah Lee <[email protected]> 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)
The order was changed.
COBOL Lisp is always mindless.
* (union '(2 2 3 4) '(7 7 8 9))
(4 3 2 2 7 7 8 9)
The right way (MatzLisp):
[2,2,3,4] | [7,7,8,9]
==>[2, 3, 4, 7, 8, 9]
--
http://mail.python.org/mailman/listinfo/python-list