|
D.15.2.1 intersectLists
Procedure from library combinat.lib (see combinat_lib).
- Usage:
- intersectLists(L,M); L list, M list
- Return:
- list, containing all elements of L which are elements of M
- Theory:
- we require the elements of the lists to have a compare operator ==.
Example:
| LIB "combinat.lib";
intersectLists(list(1,1,2,2,3),list(2,3,3,4));
==> [1]:
==> 2
==> [2]:
==> 3
intersectLists(list(1,1,2,2,3),list(1,1,2,2,3));
==> [1]:
==> 1
==> [2]:
==> 2
==> [3]:
==> 3
|
|