5 ms·
Elixir, Elm, Ocaml, Haskell, and F# all have a pipe like operator for function composition (though the actual operator varies).
by lostcolony 5y ago
Elixir, Elm, Ocaml, Haskell, and F# all have a pipe like operator for function composition (though the actual operator varies).
- madcaptenor 5y agoR also has it, if you count R as a functional language.
- 6gvONxR4sf7o 5y agoI think libraries are just as relevant as languages, and dplyr’s pipes are wildly popular and (more to the point) even idiomatic R at this point.
- madcaptenor 5y agoActually base R has a pipe operator now. (I still use the dplyr pipe, just out of familiarity.)
- uoaei 5y agoAs does Julia
- pharmakom 5y agoR is a surprisingly functional language!
- davidatbu 5y agoGot it. Thanks!
- thaumasiotes 5y agoClojure has the -> macro: https://clojuredocs.org/clojure.core/-%3E https://clojuredocs.org/clojure.core/-%3E It does the same thing, but it's much more awkward to use.
- eigenhombre 5y agoAs a daily user of -> and ->>, I am curious what you find awkward about them.
- thaumasiotes 5y agoYou have to plan to use them in advance. With a pipeline operator you can figure out the command you want at one stage and then tack on another part of the pipeline without needing to go back and alter the way you began the line.
- chaorace 5y agoThere's also a Stage 2 proposal for adding a pipe operator to JS[1] [1]: https://github.com/tc39/proposal-pipeline-operator https://github.com/tc39/proposal-pipeline-operator