add Queue.drop#12884
Conversation
nojb
left a comment
There was a problem hiding this comment.
Personally, I am not very enthusiastic about this PR. drop q is just a shorthand for ignore (take q), and not more efficient either. And if we add this operation then we must also add drop_opt and then it starts to feel like too much for such a small addition.
Anyway, let's wait to hear from other developers.
Why ? And what would be that function ? I don't even see what would be its signature, FYI this is really similar to the |
2e85f25 to
80661b7
Compare
Well, the general direction is towards exception-less APIs; but indeed there is no technical reason to do so.
Whatever it returns ( Line 143 in 536258f
Good point... Coming back to this addition, I am not strongly against; let's hear from other developers (anyway, more than 1 approval is needed for changes to the standard library). |
gasche
left a comment
There was a problem hiding this comment.
Having it for consistency with Stack also sounds reasonable to me. Thanks!
|
@zapashcanon can you rebase the PR? Then we can merge it. |
|
Rebased. :) |
Thanks! The test is failing though: |
|
Should be fixed now, sorry.. |
Hi,
This adds a
val drop : 'a t -> unitfunction to theQueuemodule.