-
Notifications
You must be signed in to change notification settings - Fork 656
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Motivation: During the `PR` #347 there was a discussion around which protocols this autoexpanding buffer should conform; the following 3 being the winners: 1. BidirectionalCollection 2. RandomAccessCollection 3. RangeReplaceableCollection Modifications: Added conformance to the 3 protocolos and provided implementaiton for 4 methods: 1. replaceSubrange(:with:) 2. index(before:) 3. removeSubrange(:) 4. remove(at:) 5. removeLast(:) Result: With the conformance of this 3 protocols and the implementation of this 5 functions we get dropLast(), dropLast(:), removeFirst(), removeLast() & popLast() for free.
- Loading branch information
Showing
3 changed files
with
335 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.