babel-plugin-pipe-composition
babel-plugin-pipe-composition copied to clipboard
Pipe backward does not work when used in a param
The following example results in a error
const chain = (fn) => (state) => (...args) => {
const result = R.apply(fn << state, args);
...
Where as when using pipe forward in the same situation works fine.
const chain = (fn) => (state) => (...args) => {
const result = R.apply(fn >> state, args);
...
I suspect this is due if (t.isCallExpression(path.parent)) { being too simple of a check when chaining the pipe backward operator.