Nested Pipes

Thanks Lyndon.
I couldn’t see any examples of packages in the list doing this. Underscores.jl is probably closest.

For background. I like Pipes because I prefer to read logic left-to-right and not have nested brackets.
I also use them to add many columns to a DataFrame. Nested example below.

using DataFrames, Pipe, DotMaps, NamedTupleTools

df = DataFrame(a = rand(10))


@pipe eachrow(df) .|> begin  
    r = DotMap(convert(Dict,NamedTuple(_)))    

    r.New   = r.a * 2
    r.New2  = r.New + 10
    # ...

    r.New20 = @pipe r.a |> sqrt |> log(__,2)    #nested pipe using __
    
    r
end |> DataFrame

btw. I’ve used this example in other questions and its not very popular though I still like it.