
26 Jul
2015
26 Jul
'15
2:51 a.m.
On 26/07/2015 at 08:30:33 +0200, Henning Thielemann wrote:
On Sun, 26 Jul 2015, Oleg Grenrus wrote:
On 26 Jul 2015, at 06:43, M Farkas-Dyck
wrote: On 26/07/2015 at 12:23:13 +0900, Fumiaki Kinoshita wrote:
There is another possible instance:
instance Semigroup a => Monoid (ZipList a) where mempty = ZipList [] mappend (ZipList xs0) (ZipList ys0) = ZipList (mappend xs0 ys0) where go (x:xs) (y:ys) = x <> y : go xs ys go xs [] = xs go [] ys = ys
This breaks the identity law.
I don't see, how it breaks the identity law. :-(
Derp. I misread the code, sorry.