Last active
January 28, 2018 03:20
-
-
Save jrsonline/2bdba3f615c790c201330ac1ec40d914 to your computer and use it in GitHub Desktop.
Functor In Swift
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
protocol FunctorTag : HKTTag { | |
typealias F = Self | |
static func fmap<A,B>(_ transform: (A) -> B ) -> (Construct<F,A>) -> Construct<F,B> | |
// fmap will take a "transform A's to B's" -> and an "F<A>" -> and return an "F<B>" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment