Skip to content

Instantly share code, notes, and snippets.

@jrsonline
Created January 27, 2018 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrsonline/9dc6b94cf5479daf633830def55f688f to your computer and use it in GitHub Desktop.
Save jrsonline/9dc6b94cf5479daf633830def55f688f to your computer and use it in GitHub Desktop.
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