-
Notifications
You must be signed in to change notification settings - Fork 9
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
new CollectionExtensions items: EmptyIfNull, Squash #152
Comments
If by empty, you mean empty set |
Indeed. |
Okay, so
@jlmorgan, @chrislwade: thoughts? |
For the sake of the test, you can sort |
Sure, but that's not even in the scope of the test currently, since the concept of sort order isn't being addressed. The check goes: given a set with some nulls, once compacted, the result should have a count that checks out (it should be short by the number of null items) and none of the remaining items are null. If we start to consider sort order, we would only want to change the sort order before comparison if the operation chose not to preserve sorting. If they chose to preserve it, the comparison would need to leave sort order alone before and after. The question is, do we care right now that there is a side effect, since it's a small one? My tendency is to create a new ticket to address it at some point, but not worry too much. |
Personally, I think the ordering would be a caveat in the method documentation. They could just as easily call |
Interestingly enough Ruby's |
Yeah I think @jlmorgan's right; since this is actually a side effect of using the |
Agreed, using |
- New BDD Tests - New Patterns.Testing global bindings and models - New methods: EmptyIfNull and Compact
- New BDD Tests - New Patterns.Testing global bindings and models - New methods: EmptyIfNull and Compact
- New BDD Tests - New Patterns.Testing global bindings and models - New methods: EmptyIfNull and Compact
- New BDD Tests - New Patterns.Testing global bindings and models - New methods: EmptyIfNull and Compact
Issue #152 - new CollectionExtensions items: EmptyIfNull, Squash
EmptyIfNull
- returns an empty set if the set is null.Squash
- returns all non-null items.Example usage:
The text was updated successfully, but these errors were encountered: