Skip to content

Instantly share code, notes, and snippets.

@Millsky
Created April 9, 2019 01:23
Show Gist options
  • Save Millsky/002cb8073d9d5cd563c64e5781ff8fa4 to your computer and use it in GitHub Desktop.
Save Millsky/002cb8073d9d5cd563c64e5781ff8fa4 to your computer and use it in GitHub Desktop.
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