Skip to content

Instantly share code, notes, and snippets.

@hungneox
Last active February 20, 2022 22:14
Show Gist options
  • Save hungneox/573ecc752b2077f3ce5abca02d7c4b59 to your computer and use it in GitHub Desktop.
Save hungneox/573ecc752b2077f3ce5abca02d7c4b59 to your computer and use it in GitHub Desktop.
import { pipe } from "fp-ts/lib/function";
const add =
(first: number) =>
(second: number): number => {
return first + second;
};
const add1 = add(1);
const add3 = add(3);
pipe(1, add1, add3); // 5
// This is equivalent to this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment