<html><head></head><body><div class="ydp8afd7a6cyahoo-style-wrap" style="font-family:courier new, courier, monaco, monospace, sans-serif;font-size:13px;"><div></div>
<div dir="ltr" data-setdir="false">Thanks to all who replied. <img title="Emoji" alt="Emoji" class="yahoo-emoji-wrapper" height="16" src="https://s.yimg.com/nq/yemoji_assets/latest/yemoji_assets/1f600.png" width="16" style="padding: 0px 2px; vertical-align: middle;" data-inlineimagemanipulating="true"> I will be changing <|> to <> .</div><div><br></div>
</div><div id="yahoo_quoted_6185378258" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Monday, May 13, 2024 at 03:05:48 AM EDT, Hécate via Haskell-Cafe <haskell-cafe@haskell.org> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="yiv6558046955"><div>
<p>Hi Mark,</p>
<p>Yes I would favour Rebecca's approach in her book to use
Semigroup. Personally I never think of lists as Monads, as I see
this instance useful only to power list comprehension. </p>
<p>Concatenation with (<>) is more meaningful and holds better
semantics than (<|>), described as just "An associative
binary operation". It's so vague it could be the documentation
for a Magma typeclass, and the name "Alternative" is quite loaded
(we think especially of parsers when thinking/seeing Alternative).
<br clear="none">
<br clear="none">
Cheers,</p>
<p>Hécate<br clear="none">
</p>
<div class="yiv6558046955moz-cite-prefix">Le 12/05/2024 à 21:41, Mark McConnell
via Haskell-Cafe a écrit :<br clear="none">
</div>
<blockquote type="cite">
</blockquote></div><div><div id="yiv6558046955yqt26387" class="yiv6558046955yqt3312382703"><div id="yiv6558046955">
<div style="font-family:courier new, courier, monaco, monospace, sans-serif;font-size:13px;" class="yiv6558046955yahoo-style-wrap">
<div dir="ltr"><font size="3" face="times new roman, new york, times, serif">We know
that lists have map. Sometimes we want to take the higher
perspective of Functor, replacing map with fmap, then
replacing fmap with <$> . This post asks the
corresponding question about append.</font></div>
<div dir="ltr"><font size="3" face="times new roman, new york, times, serif"><br clear="none">
</font></div>
<div dir="ltr"><font size="3" face="times new roman, new york, times, serif">The
notation for append within List itself is ++ . Often we
think of lists as Monads. Applicative generalizes Monad,
and Alternative specializes Applicative. Alternative has
<|> which behaves as ++ on List. I have been using
<|> for this purpose.</font></div>
<div dir="ltr"><font size="3" face="times new roman, new york, times, serif"><br clear="none">
</font></div>
<div dir="ltr"><font size="3" face="times new roman, new york, times, serif">Recently, I
have begun to read and enjoy "Effective Haskell". In
Chapter 1, this book uses <> for append. Clearly
they are thinking of List as a Semigroup.</font></div>
<div dir="ltr"><font size="3" face="times new roman, new york, times, serif"><br clear="none">
</font></div>
<div dir="ltr"><font size="3" face="times new roman, new york, times, serif">I'm curious
about your thoughts on ++ versus <|> versus <>
.</font></div>
</div>
</div></div>
<br clear="none">
<fieldset class="yiv6558046955moz-mime-attachment-header"></fieldset>
<pre class="yiv6558046955moz-quote-pre">_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
<a rel="nofollow noopener noreferrer" shape="rect" target="_blank" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" class="yiv6558046955moz-txt-link-freetext">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a>
Only members subscribed via the mailman list are allowed to post.</pre>
<pre class="yiv6558046955moz-signature">--
Hécate ✨
🐦: @TechnoEmpress
IRC: Hecate
WWW: <a rel="nofollow noopener noreferrer" shape="rect" target="_blank" href="https://glitchbra.in" class="yiv6558046955moz-txt-link-freetext">https://glitchbra.in</a>
RUN: BSD</pre>
</div></div><div class="yqt3312382703" id="yqt82568">_______________________________________________<br clear="none">Haskell-Cafe mailing list<br clear="none">To (un)subscribe, modify options or view archives go to:<br clear="none"><a shape="rect" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br clear="none">Only members subscribed via the mailman list are allowed to post.</div></div>
</div>
</div></body></html>