I read https://github.com/JuliaLang/julia/issues/5571 , which made me think that I could break such lines due to some comments:
a = [x*5 for x in 0:20 if x>4]
scale(y) = (x)-> y*x
filter(y) = x -> [z for z in x if z>y]
a|>(x->x/3)
|>scale(2)
|>filter(4)
|>println
But I get the error:
ERROR: LoadError: syntax: "|>" is not a unary operator
in include_from_node1(::String) at ./loading.jl:488
in process_options(::Base.JLOptions) at ./client.jl:265
in _start() at ./client.jl:321
Am I forced to use a|>(x->x/3)|>scale(2)|>filter(4)|>println?
source
share