Is there anything in Rust for chaining the operation like the pipeline operator |> used in Julia and F#
|>(x, f)
Applies a function to the preceding argument. This allows for easy function chaining.
Examples
≡≡≡≡≡≡≡≡≡≡
julia> [1:5;] |> x->x.^2 |> sum |> inv
0.01818181818181818
Nope, there's not. There was a crate though, where you can use (I guess it was) Haskell-like chaining as a "special syntax"... Cannot remember the name though...
let s = vec!["string1", "string2"]
.map(String::from)
.map(|s| s.split('-'))
// etc...
Note that julia is doing some magic there - it knows that the fn x->x.^2 applies to the elements, and sum applies to the whole array. In haskell you'd probably (I'm not an expert) need to use the functor or applicative typeclasses when mapping the first function over the array. I wrote a blurb about these higher order constructs on urlo.
Edit There's also operator precedence to consider. In haskell, there are 2 ways of doing function application: func arg and func $ arg. The latter has much lower precedence, so you can do things like func1 . func2 . func3 $ arg (where . is the compose operator).
It does add type-based dispatch, which Julia does in a more general way and Elixir doesn't really have at all (no idea what F# does), but it's otherwise the same.
My recommendation is not to try to do things like you would do in Julia. Better is first learning Rust to a certain extent.
As a metapher: If, for example, you learn to prepare Russian food you would first try to get somehow fluent doing it before mixing it with for instance French food subtleties. Just my 2 Cents.