andrewMacmurray / haskell-book-solutions

Solutions to exercises in Haskell Programming from first principles
MIT License
38 stars 5 forks source link

Semigroup (Or) implementation not according to specification #23

Open chetnashah opened 5 years ago

chetnashah commented 5 years ago

https://github.com/andrewMacmurray/haskell-book-solutions/blob/master/src/ch15/Semigroup.hs#L188 I think the second case below is missed?

Prelude> Fst 1 <> Snd 2
Snd 2
Prelude> Fst 1 <> Fst 2
Fst 2
Prelude> Snd 1 <> Fst 2
Snd 1
Prelude> Snd 1 <> Snd 2
Snd 1