Created
April 9, 2019 01:23
-
-
Save Millsky/002cb8073d9d5cd563c64e5781ff8fa4 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 * as R from "ramda"; | |
const log = R.tap(R.bind(console.log, console)); | |
// F1 :: float -> float | |
const f1 = f => f * 1.23; | |
// F2 :: float -> float | |
const f2 = f => f * 1.345; | |
// F3 :: float -> float | |
const f3 = R.compose( | |
f1, | |
f2 | |
); | |
R.tap( | |
R.pipe( | |
f1, | |
log, | |
f2, | |
log, | |
f3, | |
log | |
)(10) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment