News for hackers. Stuff that matters.
Re:Show HN: A JavaScript function that looks and behaves lik... by epolanski on Wednesday September 27, 2023 @09:10AM (#37674142)
How's it different from other `pipe` implementations around, e.g. the one from `fp-ts`?

https://gcanti.github.io/fp-ts/modules/function.ts.html#pipe

Re:Show HN: A JavaScript function that looks and behaves lik... by FroLeMageBlanc on Wednesday September 27, 2023 @09:37AM (#37674480)
The pipe function of `fp-ts` doesn’t have direct access to methods and properties of the pipe output like Verticalize. You have to wrap them into anonymous functions. Same with promises.
Re:Show HN: A JavaScript function that looks and behaves lik... by epolanski on Wednesday September 27, 2023 @10:02AM (#37674799)
I think this is good, last thing I want is to have too many ways to achieve the same thing.

You can always

   pipe(
     2,
     double,
     x => x.toString()
   )


I love your approach too, it's really more of a pipe operator than a `pipe` function which expects the pipeline to happen on the arguments side.