Hi Adrian, that's the way it works now for now, single-input single-output
functions only, |> may be even deprecated in the future since type
inference doesn't work well at all for now, it's going to be removed from
Base it seems. Currying/function chaining has been discussed a lot at
GitHub.
Hi Ismael,
I understand, thanks for your answer. I like the proposed solution, I'll
give it a try.
It's strange that the pipe operator won't work with type inference, seems
to be working great with F#. However, comparing with F#, I can see how
currying and partial function application can
Thanks, I like it, nice one liner.
Definitely useful for quick prototyping in REPL if too slow for production
code.
- A
marți, 29 decembrie 2015, 18:28:56 UTC+1, Ismael Venegas Castelló a scris:
>
> My proposal in the PR is:
>
> julia> show_off(x, y) = (@show x y; nothing)
> show_off
My proposal in the PR is:
julia> show_off(x, y) = (@show x y; nothing)
show_off (generic function with 1 method)
julia> show_off(1, 2)
x = 1
y = 2
julia> (1, 2) |> show_off
ERROR: MethodError: `show_off` has no method matching
show_off(::Tuple{Int64,Int
64})
Closest candidates are: