3 ms·
My favorite operator is the pipe operator. When I first found out you could do a simple `ls | more` to read long outputs, it was an eye opening experience. In C
by j_m_b 5y ago
My favorite operator is the pipe operator. When I first found out you could do a simple `ls | more` to read long outputs, it was an eye opening experience. In Clojure, we have the threading macros, `->` and `->>` that do a very similar thing. In R, we have `%>%` and now the native `|>`. Whenever a language has this operator and it is widely used, I know I am going to love it.
- substation13 5y agoI credit F# with much of the popularity of the forward pipe operator. Unlike Haskell etc. which emphasize function binding (>>), idiomatic F# has pipes all over. [1..10] |> Seq.filter (fun x -> x % 2 = 0) |> Seq.map (fun x -> x * x * x)
- j_m_b 5y agoLooks like I need to check out F#! Thanks!