Gleb Alexeyev wrote:
instance Eq a => Eq (CatList a) where
a == b = case (viewCL a, viewCL b) of
(Just (x, xs), Just (y, ys)) -> x==y && xs == ys
(Nothing, Nothing) -> True
_ -> False
I just realized that my solution is needlessly verbose, the following
instance suffices:
> instance Eq a => Eq (CatList a) where > a == b = viewCL a == viewCL b
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
