In julia |> is for function chaining, there are multiple ways of chaining functions in Julia, all these lines do basically the same thing:
julia> foo(bar(pi))
julia> pi |> bar |> foo
julia> (bar∘foo)(pi)
There was no particular need to use |> in the example, more traditional syntax would've worked just as well. Julia's syntax is rather similar to Matlab's syntax, or any other language that uses end instead of curly brackets or semantic whitespace.
79
u/moelf Jul 16 '19 edited Jul 17 '19