Skip to content

Instantly share code, notes, and snippets.

@baetheus
Created January 4, 2023 18:42
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 baetheus/460d07523c16d3b49c07b1840d94ad7f to your computer and use it in GitHub Desktop.
Save baetheus/460d07523c16d3b49c07b1840d94ad7f to your computer and use it in GitHub Desktop.
Const Types in Deno Doc
export const apply1 =
<A>(ua: Promise<A>) => <I>(ufai: Promise<(a: A) => I>): Promise<I> =>
Promise.all([ua, ufai]).then(([a, fai]) => fai(a));
export const apply2: <A>(
ua: Promise<A>,
) => <I>(ufai: Promise<(a: A) => I>) => Promise<I> = apply1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment