diff --git a/base/operators.jl b/base/operators.jl index 9949f60bd597c..de5e52987a278 100644 --- a/base/operators.jl +++ b/base/operators.jl @@ -901,10 +901,11 @@ widen(x::Type{T}) where {T} = throw(MethodError(widen, (T,))) |>(x, f) Applies a function to the preceding argument. This allows for easy function chaining. +When used with anonymous functions, parentheses are typically required around the definition to get the intended chain. # Examples ```jldoctest -julia> [1:5;] |> (x->x.^2) |> sum |> inv +julia> [1:5;] .|> (x -> x^2) |> sum |> inv 0.01818181818181818 ``` """