<div dir="auto"><div>I guess the real point is that I don't think most people will expect an `extract` function in `containers` to be a comonadic one.<br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Dec 6, 2020, 1:05 PM Oleg Grenrus <<a href="mailto:oleg.grenrus@iki.fi">oleg.grenrus@iki.fi</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<p>NonEmptySeq could be. NonEmptySet almost (it could have extract).<br>
<br>
- Oleg<br>
</p>
<div>On 6.12.2020 20.02, David Feuer wrote:<br>
</div>
<blockquote type="cite">
<div dir="auto">None of these types are comonads, so it doesn't
seem *that* confusing.</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sun, Dec 6, 2020, 12:59 PM
Bob Ippolito <<a href="mailto:bob@redivi.com" target="_blank" rel="noreferrer">bob@redivi.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="ltr">`extract` overlaps with the Comonad typeclass
(extract, duplicate, extend)</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sun, Dec 6, 2020 at
9:34 AM Tom Ellis <<a href="mailto:tom-lists-haskell-cafe-2017@jaguarpaw.co.uk" rel="noreferrer noreferrer" target="_blank">tom-lists-haskell-cafe-2017@jaguarpaw.co.uk</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I really like
`extract`!<br>
<br>
On Sun, Dec 06, 2020 at 05:29:40PM +0000, Alexey
Kuleshevich wrote:<br>
> `extract` is the name that I would suggest. I also
agree with David<br>
> that `pop` is a bit too confusing in a
non-stack/queue data<br>
> structure. If all languages named it pop, then it
would be good<br>
> argument for the name, but we don't need to copy
python. The only<br>
> thing that pyhon has that I wish we had in Haskell is
the popularity<br>
> ;)<br>
> <br>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐<br>
> On Sunday, December 6, 2020 8:16 PM, Carter Schonwald
<<a href="mailto:carter.schonwald@gmail.com" rel="noreferrer noreferrer" target="_blank">carter.schonwald@gmail.com</a>>
wrote:<br>
> <br>
> > LookupThenRemove seems like a more descriptive
name. Though I guess I can see why pop has appeal.<br>
> ><br>
> > On Sun, Dec 6, 2020 at 11:44 AM David Feuer <<a href="mailto:david.feuer@gmail.com" rel="noreferrer noreferrer" target="_blank">david.feuer@gmail.com</a>>
wrote:<br>
> ><br>
> >> I suggest you add a version for
Data.Sequence combining lookup with deleteAt. I wanted
that for something fairly recently.<br>
> >><br>
> >> On Sun, Dec 6, 2020, 11:41 AM Martijn
Bastiaan via Libraries <<a href="mailto:libraries@haskell.org" rel="noreferrer noreferrer" target="_blank">libraries@haskell.org</a>>
wrote:<br>
> >><br>
> >>> Yeah, Python's `pop` made me call it
`pop`. I had hoped to find other<br>
> >>> examples, but Java, Rust, and Ruby don't
seem to offer `pop`-like<br>
> >>> functions for their (hash)maps.<br>
> >>><br>
> >>> On 12/6/20 5:29 PM, Tom Ellis wrote:<br>
> >>>> On Sun, Dec 06, 2020 at 11:25:33AM
-0500, David Feuer wrote:<br>
> >>>>> The name pop makes me think of a
stack. Is this use of the word common?<br>
> >>>> Python uses that name, which is why
I'm familiar with it:<br>
> >>>><br>
> >>>>>>> d = {'a': 1, 'b': 2}<br>
> >>>>>>> d.pop('b')<br>
> >>>> 2<br>
> >>>>>>> d<br>
> >>>> {'a': 1}<br>
> >>>>
_______________________________________________<br>
> >>>> Libraries mailing list<br>
> >>>> <a href="mailto:Libraries@haskell.org" rel="noreferrer noreferrer" target="_blank">Libraries@haskell.org</a><br>
> >>>> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
> >>>
_______________________________________________<br>
> >>> Libraries mailing list<br>
> >>> <a href="mailto:Libraries@haskell.org" rel="noreferrer noreferrer" target="_blank">Libraries@haskell.org</a><br>
> >>> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
> >><br>
> >>
_______________________________________________<br>
> >> Libraries mailing list<br>
> >> <a href="mailto:Libraries@haskell.org" rel="noreferrer noreferrer" target="_blank">Libraries@haskell.org</a><br>
> >> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
<br>
> _______________________________________________<br>
> Libraries mailing list<br>
> <a href="mailto:Libraries@haskell.org" rel="noreferrer noreferrer" target="_blank">Libraries@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
<br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" rel="noreferrer noreferrer" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote>
</div>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" rel="noreferrer noreferrer" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Libraries mailing list
<a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer">Libraries@haskell.org</a>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" target="_blank" rel="noreferrer">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a>
</pre>
</blockquote>
</div>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer">Libraries@haskell.org</a><br>
<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>
</blockquote></div></div></div>