Created
January 27, 2018 15:26
-
-
Save jrsonline/9dc6b94cf5479daf633830def55f688f 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 LinkedList : Constructible { | |
typealias TypeParameter = T | |
} | |
extension LinkedListTag: FunctorTag { | |
static func fmap<A, B>(_ transform: @escaping (A) -> B) -> (Construct<LinkedListTag, A>) -> Construct<LinkedListTag, B> { | |
return { applyA in | |
return LinkedList<A>.lower(applyA).lmap(transform)^ | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment