cataM
  :: (Recursive t, T.Traversable (Base t), Monad m)
  => (Base t a -> m a) -- ^ a monadic (Base t)-algebra
  -> t                 -- ^ fixed point
  -> m a               -- ^ result
cataM f = c where c = f <=< T.mapM c <=< (return . project)

-- from http://jtobin.ca/monadic-recursion-schemes
cataM
  :: (Recursive t, T.Traversable (Base t), Monad m)
  => (Base t a -> m a) -- ^ a monadic (Base t)-algebra
  -> t                 -- ^ fixed point
  -> m a
cataM f = c where c = f <=< T.mapM c <=< (return . project)

-- from http://jtobin.ca/monadic-recursion-schemes
cataM f = c where c = f <=< T.mapM c <=< (return . project)

-- from http://jtobin.ca/monadic-recursion-schemes