Hacker News new | ask | show | jobs
by unilynx 47 days ago
I think he actually wants pipes. Instead of having to write:

  f3(f2(f1(some data)))
it would be nice to write

  some data |> f1 |> f2 |> f3
javascript has proposals for pipe operators because as soon as the simple .map /.filter/.reduce APIs don't suffice (ie. as soon as Promise.all is needed) the f3(f2(f1(data))) mess starts.
2 comments

I have also used ramda for this

R.pipe(f1,f2,f3)()

F# for the win!