Control.Monad.Writer.Strict not as strict as expected
Edward Kmett
ekmett at gmail.com
Fri Sep 16 01:28:41 CEST 2011
Yes. Hence why I pointed out some (myself included) would argue that the lazy versions are not properly monads.
Sent from my iPad
On Sep 15, 2011, at 5:12 PM, Henning Thielemann <lemming at henning-thielemann.de> wrote:
>
> On Thu, 15 Sep 2011, Edward Kmett wrote:
>
>> The Strict/Lazy writer split has nothing to do with the strictness of your monoid, but
>> rather whether or not operations such as:
>> > fmap f ~(w, a) = (w, f a)
>
> Doesn't this violate the fmap law
>
> fmap id = id
>
> because
>
> fmap id undefined = (undefined, undefined)
>
> ?
More information about the Libraries
mailing list