Skip to content

Instantly share code, notes, and snippets.

@caasi
Created May 8, 2020 16:21
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 caasi/ecf07037c2a34903189fc622bbba92d2 to your computer and use it in GitHub Desktop.
Save caasi/ecf07037c2a34903189fc622bbba92d2 to your computer and use it in GitHub Desktop.
type PromiseBind<A, B> = (a: Promise<A>, f: (x: Promise<A>) => Promise<B>) => Promise<B>;
type OptionBind<A, B> = (a?: A, f: (x: A) => (B | undefined)) => (B | undefined);
type ListBind<A, B> = (a: A[], f: (x: A) => B[]) => B[];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment