Generalized to Collection rather than just List.