This thread is from 4.5 years ago, the landscape was quite different back then
With DataPipes.jl, one can write the original example from the first post basically without any changes, and continue using .|>
:
julia> @p 2 |> __ .+ (1:3) .|> __^2
3-element Vector{Int64}:
9
16
25
or use `map` as you suggest
julia> @p 2 |> __ .+ (1:3) |> map(_^2)
3-element Vector{Int64}:
9
16
25