At first I did not like pipes as much, because it felt limited (only first argument) and I was fresh out of Clojure. Then I realized to appreciate the power of limitations. Data design in Elixir feels very natural since you have an intuitive understanding of what the first argument should be. I am fine with that, although I could create a pipe_second
or pipe_third
, I’d never do that because I prefer stability to extreme sports. I had struggle grokking the pipe (looks the same: |>
) of F#, because it doesn’t pipe into first argument, but the final one, and for some time I couldn’t visualize function signatures in my head, but everything became clear after I embraced the curry-by-default mindset. It does not have macro that would be threading in, but they don’t need it, because f(a, b)(c)
is f(a, b, c)
and c |> f(a, b)
is just rotating the (c)
.
But even then, Elixir’s is the best pipe for me.
(btw I am not saying Clojure is extreme sports, it has different philosophy and design mindset)