Skip to content

Instantly share code, notes, and snippets.

@Willmo36
Created March 20, 2018 15:03
Show Gist options
  • Save Willmo36/d982fe1b02cb23d2d3870ce7de9668fc to your computer and use it in GitHub Desktop.
Save Willmo36/d982fe1b02cb23d2d3870ce7de9668fc to your computer and use it in GitHub Desktop.
liftA2.ts
const liftA2 = <T, R>(f: (x: T) => (y: T) => R) => (x: Maybe<T>) => (y: Maybe<T>): Maybe<R> => y.ap(x.map(f));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment