This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// There's a proposal for a new 'pipe' operation |> https://github.com/tc39/proposal-pipeline-operator | |
// Below are two methods (`pipe` and `pwhyp`) you could use right now to achieve the same result. | |
// `pipe` easy version. Use `.next(someFunction)` to apply a new function | |
function pipe(value) { | |
return { | |
next: (f) => pipe(f(value)), | |
end: () => value, |