instance Applicative Data.Map

Edward Kmett ekmett at gmail.com
Thu Nov 15 15:10:29 CET 2012


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.

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.

I think Daniel Peebles was the first to spot the Bind instance for Map, and
by extension the Apply instance.


On Thu, Nov 15, 2012 at 4:19 AM, Henning Thielemann <
lemming at henning-thielemann.de> wrote:

>
> On Wed, 14 Nov 2012, Brent Yorgey wrote:
>
>  Precisely.  See edwardk's package
>>
>>  http://hackage.haskell.org/**package/semigroupoids<http://hackage.haskell.org/package/semigroupoids>
>>
>> which defines this and many other related things.
>>
>
> I see, what I need is the Apply class from that package. Fortunately
> Data.Map is already an instance of the Apply class.
>
>
> ______________________________**_________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/**mailman/listinfo/libraries<http://www.haskell.org/mailman/listinfo/libraries>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20121115/6881c3a3/attachment.htm>


More information about the Libraries mailing list