Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
reader composition
node v6.17.1
version:
master
endpoint
share
tweet
const Reader = require('ramda-fantasy').Reader; const R = require('ramda'); const fnA = (a) => Reader(env => a + env.a) const fnB = (b) => Reader(env => b + env.b) const fnAB = R.pipeK( fnA, fnB ) fnAB(20).run({ a: 1, b: 2}) // Desired output: 23
Loading…
no comments
sign in
to comment