Created
February 19, 2019 14:23
-
-
Save kuribas/6313a64a91297c8dbe4a61c8dcd97c22 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
-- this is the same as Functor fmap, but that instance cannot be | |
-- written, since the type variable is one level too deep. | |
fixmap :: (Functor (f a), Bifunctor f) => (a -> b) -> Fix (f a) -> Fix (f b) | |
fixmap f = cata (Rec . first f) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment