-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Implement ZStream#dropRight #5407
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great addition. Thanks @luis3m!
@@ -28,6 +28,12 @@ private[zio] final class SingleThreadedRingBuffer[A](capacity: Int) { | |||
increment() | |||
} | |||
|
|||
def putAndGet(value: A): Option[A] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels a little bit uncompositional but can address in a follow up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adamgfraser any suggestions? I can address this in this PR if you like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@luis3m Basically just separate putting and getting into their own operators instead of having one that does both.
@luis3m Can you format? |
@adamgfraser done, also removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
No description provided.