-
-
Notifications
You must be signed in to change notification settings - Fork 24
Pipeline Operator (Stage 1) #29
Description
Champion: @littledan
Spec Repo: https://github.com/tc39/proposal-pipeline-operator
First presented at Sept 2017 meeting: https://github.com/tc39/agendas/blob/master/2017/09.md
Slides: https://docs.google.com/presentation/d/1qiWFzi5dkjuUVGcFXwypuQbEbZk-BV7unX0bYurcQsA/edit#slide=id.p
Related proposal: Partial Application https://github.com/rbuckton/proposal-partial-application by @rbuckton
Related proposal: Function Bind Operator https://github.com/tc39/proposal-bind-operator
Basic Example
Input
let result = "hello"
|> doubleSay
|> capitalize
|> exclaim;
result //=> "Hello, hello!"Output
let result = exclaim(capitalize(doubleSay("hello")));
result //=> "Hello, hello!"Initial Implementation (would need updating to v7)
- Initial Spec PR by @littledan Add a specification tc39/proposal-pipeline-operator#51
Old/Alternative Implementations
- Old PR to Babel: New plugin for pipeline operator proposal babel#3159
- https://github.com/SuperPaintman/babel-plugin-transform-pipeline
<<and>>: https://github.com/michaelmitchell/babel-plugin-pipe-composition
Implementation
- Parser PR: Pipeline Operator proposal babylon#742
- Transform PR: Pipeline operator babel#6335
- Feedback around relating Pipeline Operator, Function Bind, Partial Application