list union and intersection, STL algorithm