
7 May
2018
7 May
'18
11:19 p.m.
We can write instance Bounded a => Bounded (Maybe a) where minBound = Nothing maxBound = Just maxBound instance (Bounded a, Bounded b) => Bounded (Either a b) where minBound = Left minBound maxBound = Right maxBound While Bounded intentionally does not have an Ord superclass, I think it's worth mentioning that these are the instances that arise naturally from the Ord instances for the types in question.