Last active
February 20, 2022 22:14
-
-
Save hungneox/573ecc752b2077f3ce5abca02d7c4b59 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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