Plumber
Provides the @pipe
macro which
makes using the |>
syntax a little nicer. Instead of writting an
anonymous function like so
x = 10
f(x) = x^2
g(x,y) = x + y
x |> f |> x -> g(x,x)
You can and reference the output with a underscore
x = 10
f(x) = x^2
g(x,y) = x + y
@pipe x |> f |> g(_,_)
Any code that uses underscores will be transformed, adding an anonymous function
x |> f |> whale->begin
g(whale, whale)
end
Should work even for weird expressions.
x = 10
Pipe.@pipe(x |> [_,_] |> [_...,_...] ) == [10,10,10,10]
To install run
]add https://github.com/onetonfoot/Plumber.jl.git