Xiaodi Wu

Results 70 comments of Xiaodi Wu

> On second thought, I don't like the heterogeneous comparison operators, because they complicate generic code. Therefore, I'm against generic operations on BitSet or SetAlgebra, and I'd prefer to wait...

> Note: this isn't an explicit Standard Library requirement for the Collection protocol, although the stdlib does assume it holds true for RandomAccessCollection types. That is only the default implementation...

This implementation of `Comparable` conformance violates the requirements of the protocol. Namely, two elements can both compare not less than each other but also not equal to each other, which...

It's nice to use the same term consistently where possible. Since this type is being called a _counted_ multiset, it makes sense to me that we should be able to...

As has been discussed in this repo, a “scan” function is going to be named `reductions`, and there is active work in another PR to design and add that functionality....

Is this functionality not adequately served by the existing `slidingWindows` API? If not, we should figure out what's missing and augment that API, rather than duplicating it.

@natecook1000 I agree with @kylemacomber and actually quite like the latter option: it reads well and composes nicely with APIs we already have. The drawbacks I can see are that...

@natecook1000 Sadly not so soon for tuple conformances I think, as the proposal has now expired, I believe. Where the `on:` parameter really shines is in avoiding repetition when your...

> `partitioningIndex(where:)` is a slight generalization of a binary search, and is an O(log _n_) operation for random-access collections; O(_n_) otherwise.

> If you need to compare the count of a filtered sequence, using this method can give you a performance boost over filtering the entire collection, then comparing its count:...