It's logical, but I couldn't figure it out and none of the web pages I could find mentioned it (and the compiler just complains if you try "newtype Compose g f a = "
Also, is the Functor declaration really necessary? Seems like you can write```instance (Foldable f1, Foldable f2) => Foldable (Compose f1 f2) wherefoldr f start (O list) = foldr g start listwhere g = flip . foldr f
-- These next two instances are based on suggestions from Creighton Hogg: instance (Foldable g, Foldable f, Functor g) => Foldable (g :. f) where -- foldMap f = fold . fmap (foldMap f) . unO foldMap f = foldMap (foldMap f) . unO -- fold (O gfa) = fold (fold <$> gfa) -- fold = fold . fmap fold . unO fold = foldMap fold . unO -- I could let fold default