New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ContainsAll is confusing #20
Comments
We cannot make The |
I've become more inclined to allow Changing |
Fix pub global on Windows + add test
The The |
In the declaration:
The identifier
Character
should be lowercase ➜character
But, even so, the analogy with a collection of characters is not a good one. If you say
containsAll
in a Set it doesn't mean a sequence, but the individual elements. Here it means a subsequence: the characters in the exact order, with no other characters between them.I'd remove this method and leave only the
contains
method, which would accept a single character or multiple characters. You say it should not accept it/// because then it is not a single element of this [Iterable] of characters.
You don't want to break the Iterable's contract, but so what? I don't see how anyone could use it wrong if you merge both methods into a single one.Still, if you don't like that I'd change the declaration of both methods to:
That's much clearer and easier to use.
The text was updated successfully, but these errors were encountered: