There is also Data.Functor.Bind which provides a 'semimonad' (perhaps that would have been a better name) for Map and other types that can't offer 'pure' as well.<div><br></div><div>The originally were added because many comonads cannot offer an identity to their apply-like operation, but then we started finding more semiapplicatives and semimonads that weren't comonadic, like Map, etc.</div>
<div><br></div><div>I think Daniel Peebles was the first to spot the Bind instance for Map, and by extension the Apply instance.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Nov 15, 2012 at 4:19 AM, Henning Thielemann <span dir="ltr"><<a href="mailto:lemming@henning-thielemann.de" target="_blank">lemming@henning-thielemann.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On Wed, 14 Nov 2012, Brent Yorgey wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Precisely. See edwardk's package<br>
<br>
<a href="http://hackage.haskell.org/package/semigroupoids" target="_blank">http://hackage.haskell.org/<u></u>package/semigroupoids</a><br>
<br>
which defines this and many other related things.<br>
</blockquote>
<br></div>
I see, what I need is the Apply class from that package. Fortunately Data.Map is already an instance of the Apply class.<div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<u></u>_________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/<u></u>mailman/listinfo/libraries</a><br>
</div></div></blockquote></div><br></div>