Anotate collection that has len() and can also be iterated
I have a method that takes a collection which I need to iterate and call “len”. In practice, I pass both List and Set to it. My method looks like:
I have a method that takes a collection which I need to iterate and call “len”. In practice, I pass both List and Set to it. My method looks like: