On Sun, Dec 13, 2015 at 10:32 PM, Kevin Smith <[email protected]> wrote:
> (someArray > .filter(...) > .map(...) > |> someOtherArrayOp > ).forEach(...) > > Note the extra parens before the "forEach" invocation. For the record I think a pipe operator is silly - I wish | were available because that is the only operator I will ever think of as a pipe. That said, if you want to get silly - you could have a pipe operator which uses the current `this`, and one that compiles to use .call(lhs_argument, ...). <> (uses the left-hand-side value as `this` for the next function) |> (simply passes the left-hand-side value to the right preserving this) Yes. I"m using the spaceship operator for this because why not, I already think this is silly. ```javascript [ 'a', 'b', 'c' ] <> filter(...) <> map(...) |> someOtherNonArrayFunc <> forEach(...) ``` _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

