Skip to content

Instantly share code, notes, and snippets.

@waynevanson
Last active April 17, 2021 23:52
Show Gist options
  • Save waynevanson/683fb99ccab09fb79f29b18de0193139 to your computer and use it in GitHub Desktop.
Save waynevanson/683fb99ccab09fb79f29b18de0193139 to your computer and use it in GitHub Desktop.
// defined in fp-ts
export interface Functor<F> {
map: <A,B>(f: (a:A) => B) => (fa: HKT<F,A>) => HKT<F,B>
}
// How it looks in an array
export interface FunctorArray extends Functor<"Array"> {
map: <A,B>(f: (a:A) => B) => (fa: Array<A>) => Array<B>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment