Skip to content

Instantly share code, notes, and snippets.

@jrsonline
Created January 28, 2018 03:24
Show Gist options
  • Save jrsonline/3f0cfecfc67d4112dadfc87e52d98848 to your computer and use it in GitHub Desktop.
Save jrsonline/3f0cfecfc67d4112dadfc87e52d98848 to your computer and use it in GitHub Desktop.
protocol Functor {
typealias F = Self
static func fmap<A,B>(_ transform: (A) -> B ) -> (F<A>) -> F<B>
static func map<A,B>(_ transform: (A) -> B ) -> (F<A>) -> [B]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment