instance (Traversable t) => Foldable t where
foldMap = Data.Traversable.foldMapDefault
instance (OtherFoldableChild t) => Foldable t where
foldMap = Data.OtherFoldableChild.foldMapDefaultOther
f :: (Traversable t, OtherFoldableChild t) => t a -> ...
f xs = ... (foldr (+) 0 xs) ...
no subject
Date: 2015-03-30 12:41 pm (UTC)Бамц.