Last active
January 27, 2018 15:27
-
-
Save jrsonline/07af5f9db0e591a546743566eb813c9b to your computer and use it in GitHub Desktop.
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
extension Array : Constructible { | |
typealias TypeParameter = Element | |
} | |
extension ArrayTag : FunctorTag { | |
static func fmap<A, B>(_ transform: @escaping (A) -> B) -> (Construct<ArrayTag, A>) -> Construct<ArrayTag, B> { | |
return { applyA in | |
return [A].lower(applyA).map( transform )^ | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment