Created
September 9, 2017 14:59
-
-
Save haroldcarr/159e2f62cfcb478c65889c9fe566ab8f to your computer and use it in GitHub Desktop.
monadic version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cataM' :: (Applicative m, Monad m, Traversable t) | |
=> (t a -> m a) | |
-> ((Fix t -> m a) -> (Fix t -> m a)) | |
-> (Fix t -> m a) | |
cataM' f g = g ((f =<<) . traverse (cataM' f g) . unFix) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment