<div>`extract` is the name that I would suggest. I also agree with David that `pop` is a bit too confusing in a non-stack/queue data structure. If all languages named it pop, then it would be good argument for the name, but we don't need to copy python. The only thing that pyhon has that I wish we had in Haskell is the popularity ;)<br></div><div> +1 on the function itself from me, I've needed it multiple occasions.<br></div><div class="protonmail_signature_block protonmail_signature_block-empty"><div class="protonmail_signature_block-user protonmail_signature_block-empty"><br></div><div class="protonmail_signature_block-proton protonmail_signature_block-empty"><br></div></div><div><br></div><div>‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐<br></div><div> On Sunday, December 6, 2020 8:16 PM, Carter Schonwald <carter.schonwald@gmail.com> wrote:<br></div><div> <br></div><blockquote class="protonmail_quote" type="cite"><div dir="auto">LookupThenRemove seems like a more descriptive name.  Though I guess I can see why pop has appeal. <br></div><div><div><br></div><div class="gmail_quote"><div dir="ltr">On Sun, Dec 6, 2020 at 11:44 AM David Feuer <<a href="mailto:david.feuer@gmail.com">david.feuer@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">I suggest you add a version for Data.Sequence combining lookup with deleteAt. I wanted that for something fairly recently.<br></div><div><br></div><div class="gmail_quote"><div dir="ltr">On Sun, Dec 6, 2020, 11:41 AM Martijn Bastiaan via Libraries <<a href="mailto:libraries@haskell.org" target="_blank">libraries@haskell.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Yeah, Python's `pop` made me call it `pop`. I had hoped to find other <br></div><div> examples, but Java, Rust, and Ruby don't seem to offer `pop`-like <br></div><div> functions for their (hash)maps.<br></div><div> <br></div><div> On 12/6/20 5:29 PM, Tom Ellis wrote:<br></div><div> > On Sun, Dec 06, 2020 at 11:25:33AM -0500, David Feuer wrote:<br></div><div> >> The name pop makes me think of a stack. Is this use of the word common?<br></div><div> > Python uses that name, which is why I'm familiar with it:<br></div><div> ><br></div><div> >>>> d = {'a': 1, 'b': 2}<br></div><div> >>>> d.pop('b')<br></div><div> > 2<br></div><div> >>>> d<br></div><div> > {'a': 1}<br></div><div> > _______________________________________________<br></div><div> > Libraries mailing list<br></div><div> > <a href="mailto:Libraries@haskell.org" rel="noreferrer" target="_blank">Libraries@haskell.org</a><br></div><div> > <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br></div><div> _______________________________________________<br></div><div> Libraries mailing list<br></div><div> <a href="mailto:Libraries@haskell.org" rel="noreferrer" target="_blank">Libraries@haskell.org</a><br></div><div> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br></div></blockquote></div><div>_______________________________________________<br></div><div> Libraries mailing list<br></div><div> <a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br></div><div> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br></div></blockquote></div></div></blockquote><div><br></div>