HNHacker News
TopNewBestAskShowJobs

FroLeMageBlanc

66 karma · joined October 4, 2017

https://github.com/laurentpayot
submissionscomments
FroLeMageBlanc··on Show HN: A JavaScript function that looks and behaves like a pipe operator
If you can’t understand the difference between pure (no side effects) and functional (applying and composing functions), I don’t know what to tell you.
FroLeMageBlanc··on Show HN: A JavaScript function that looks and behaves like a pipe operator
Purely functional programming is a subset of functional programming (see F# for instance). I was referring to the pipe operator syntax common to many functional programming languages like Haskell, F#, OCaml, Elixir, Elm and so on...
FroLeMageBlanc··on Show HN: A JavaScript function that looks and behaves like a pipe operator
Haha thanks! Yes haters gonna hate. If you like it, use it; if you don’t, simply don’t use it ;)
FroLeMageBlanc··on Show HN: A JavaScript function that looks and behaves like a pipe operator
Is functional programming a joke? YMMV...
FroLeMageBlanc··on Show HN: A JavaScript function that looks and behaves like a pipe operator
Thanks! I’m currently trying to find a better TS type but that’s a bit hairy...
FroLeMageBlanc··on Show HN: A JavaScript function that looks and behaves like a pipe operator
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.
FroLeMageBlanc··on Show HN: A JavaScript function that looks and behaves like a pipe operator
Author here. Thanks! Yes I have to confess I have both a Scheme and Elm background ;)
FroLeMageBlanc··on Show HN: A JavaScript function that looks and behaves like a pipe operator
Author here. Thanks for your nice comment. I added a note to show the "normal" autoformatted syntax.
FroLeMageBlanc··on Show HN: A JavaScript function that looks and behaves like a pipe operator
Author here. Thanks for your nice comment. I added a note to say it does work with autoformatters too. Actually someone in a comment below said he or she prefers the autoformatted syntax.