set algorithms work with iterables