A=[1,2,3]; B=[1,1,1]; A.>B |> sum
1:2 .|> x->x^2 |> sum |> inv
Question 3 (warning: spoilers)
The behaviors above seem just… evil! . Can we fix this? Changing the operator precedence is breaking, but is there really code out there relying on this behavior?
Credits: First example from personal suffering. Second example adapted from this discussion, itself adapted from the documentation:
help?> |> search: |> |>(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