Native Function Composition

T.J. Crowder tj.crowder at
Sat Aug 26 07:46:37 UTC 2017

On Sat, Aug 26, 2017 at 3:07 AM, Jordan Harband <ljharb at> wrote:
> "incompatible" is a very strong and likely incorrect claim. `(sync1 |>
sync2 |> async1).then(x => x |> sync3 |> async2).then(x => async3)` could
work just fine.

Or indeed, a robust proposal might allow for async functions in the
pipeline (with some indication, so you can look at the code and reason
about it; although `then` accepts non-thenable values and you can't tell by
looking, so...). Conceptually:

let x = sync1 |> sync2 |*> async1 |> sync3 |*> async2 |*> async3;

-- T.J. Crowder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list