Tim Vermeulen

Results 13 issues of Tim Vermeulen

You mention that `forEach` is more efficient than a regular `for` loop for `BTree`s, which isn't really ideal. It's true that it's a lot easier to write an efficient `forEach`...

performance

Find the location of a subsequence in a collection. * `firstRange(of:)` * `lastRange(of:)` * `contains(_:)` ```swift extension Collection { public func firstRange( of other: Other, by areEquivalent: (Element, Other.Element) throws...

Find the common prefix/suffix of two sequences or collections. * `commonPrefix(with:)` * `commonSuffix(with:)` * `endOfCommonPrefix(with:)`: get a pair of indices that mark the end of the common prefix of two...

Depends on #155. Replace occurrences of a given subsequence with a given replacement. * `replacingOccurrences(of:with:)` * `lazy.replacingOccurrences(of:with:)` * `replaceOccurrences(of:with:)` The lazy overloads are available on all lazy collections while the...

Depends on #154. Note that the overload on `LazyCollectionProtocol` returns a `LazyCollection` rather than a `SplitCollection`. The purpose of this is to have it return slices of the underlying collection,...

Divide a collection into a given number of chunks as evenly as possible, with larger chunks at the start. ```swift for chunk in Array(0..

Adds support for a line that can be divided into segments that each sum to the same given sum, introduced by zetamath here: https://logic-masters.de/Raetselportal/Raetsel/zeigen.php?id=0009MN The implementation uses a similar approach...

Submitting this PR to see if there is any interest in something like this 🙂 Obviously it's maybe not ideal to have to import a trait to be able to...

Adds the `--restore-snapshots=` option to `rebase` and other commands, as initially suggested by @lilyball on Discord. I'm not super fond of the name, but that's a whole other can of...