dear julia experts: I am trying to understand method chaining. I believe that instead of f(g(x))
, this means I can use g(x) |> f()
.
Can one do more than this? Say, I have defined
julia> grep(heystack,needle) = filter( x->contains(x, needle), heystack )
grep (generic function with 1 method)
is it possible to accomplish something like readdir("/etc") |> grep("password")
, akin to Unix piping, in Julia now? I suspect not, but was wondering…
regards, /iaw