6
鏈接
我讀https://github.com/JuliaLang/julia/issues/5571這讓我覺得我能打破這樣的線路,由於一些評論:方法朱莉婭
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
但我得到的錯誤:
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
我是被迫要使用a|>(x->x/3)|>scale(2)|>filter(4)|>println
?