Modify a Expr to generate a new Expr

this “works” in the REPL, but are you certain that it does what you think it does?

your definition is equivalent to

innerfun(x, xx) = x+2-xx
outerfun(xx) = innerfun(xx+1, xx)
outerfun(1) 
julia> :(x |> y |> z)
:((x |> y) |> z)

julia> :(x |> y->y |> z)
:(x |> (y->begin
              #= REPL[10]:1 =#
              y |> z
          end))
2 Likes