-
Notifications
You must be signed in to change notification settings - Fork 656
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Enhance CircularBuffer with insertFirst and popFirst/Last #279
Comments
sure, we can totally just implement the missing methods. @Lukasa / @normanmaurer opinions? |
Eh, sure, why not? |
If we can without any perf hit for our use-case I am in
… Am 05.04.2018 um 10:46 schrieb Cory Benfield ***@***.***>:
Eh, sure, why not?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@helje5 btw we love PRs :) |
Every one loves PRs! But then @Lukasa wants you to write tests for perfectly working code and a 2 minute patch becomes hours and hours. Been there, done that ;-) But yes, I consider doing a PR. I need to fully understand it to do the |
I'm a monster, I know. And yet I feel so little guilt! |
(Also I'd definitely make @weissi write the tests too.) |
@Lukasa maybe I should write the patch then as it seems I will not need to write tests 🤷♂️ ;) |
I will take a stab on this once #313 is merged |
Motivation: Its often useful to be able to add / retrieve elements on both sides of a CircularBuffer. Modifications: Add last / addFirst to be able to act on both ends. Add tests Result: Fixes apple#279
Motivation: Its often useful to be able to add / retrieve elements on both sides of a CircularBuffer. Modifications: Add last / addFirst to be able to act on both ends. Add tests Result: Fixes apple#279
Motivation: Its often useful to be able to add / retrieve elements on both sides of a CircularBuffer. Modifications: Add last / addFirst to be able to act on both ends. Add tests Result: Fixes apple#279
Motivation: Its often useful to be able to add / retrieve elements on both sides of a CircularBuffer. Modifications: - Add last / prepend to be able to act on both ends. - Add tests Result: Fixes apple#279
Motivation: Its often useful to be able to add / retrieve elements on both sides of a CircularBuffer. Modifications: - Add last / prepend to be able to act on both ends. - Add tests Result: Fixes #279
I'd like to abuse the
CircularBuffer
as a CoW data structure w/ linked list behaviour (better index-0 insert/remove behaviour thanContiguousArray
, which I currently use). Since the ivars are all private, I can't extendCircularBuffer
with the operations I need. I think it would be those (also available in the stdlib, excluding insertFirst):Would be great to get those (and a CoW linked list ;-) )
The text was updated successfully, but these errors were encountered: