Re:For the Love of Pipes
by duckerude on Tuesday January 22, 2019 @09:05AM
(#18968284)
Small correction (or it won't run on my system):
All those anonymous functions seem a bit distracting, though https://github.com/JuliaLang/julia/pull/24990 could help with that.
[ Parent
| on HN ]
Ok, in Julia 1.0+ you just have to use the dot operator:
1:3 |> x->x.+1 |> x->join(x,",") |> length
Note the dot in x.+1, that tells + to operate on each element of the array (x), and not the array itself.
Ok... not sure which version of Julia you're using, but I'm on 0.5 and it works there... Maybe it changed in a later version