babel-plugin-pipe-composition icon indicating copy to clipboard operation
babel-plugin-pipe-composition copied to clipboard

Pipe backward does not work when used in a param

Open micahnz opened this issue 9 years ago • 0 comments

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.

micahnz avatar Aug 29 '16 08:08 micahnz