4 ms·
The pipeline operator |> exists in Elm[0]. It is available in bash as & and the popular (in my limited experience) package flow[1] also implements it as |> for
by 1-more 5y ago
The pipeline operator |> exists in Elm[0]. It is available in bash as & and the popular (in my limited experience) package flow[1] also implements it as |> for readability. It is a proposed addendum to Javascript[2] but I have no idea how seriously the JS powers-that-be are taking that.
The example you gave of Python doesn't have tagged union. I really don't know much at all about Python so maybe the type checker can tell you that you're handling all the cases, but with tagged union types you can have to handle every possible output of `str_if_zero` when calling it. That doesn't have to be an FP thing but I only find it when doing Elm and Haskell in my experience.
[0] https://elm-lang.org/docs/syntax#operators https://elm-lang.org/docs/syntax#operators
[1] https://hackage.haskell.org/package/flow https://hackage.haskell.org/package/flow
[2] https://github.com/tc39/proposal-pipeline-operator https://github.com/tc39/proposal-pipeline-operator
- 1-more 5y agoFor some reason I wrote "bash" when I meant "Haskell" in the second sentence. Sorry about that.