import Base:(+),(*),(-)

julia> 2+3+4
9
julia> (+){T<:Integer}(a::T,b::T,c::T) = ((a+b)+c)+1
julia> 2+3+4
10

julia> 2-3-4
-5
julia> (+){T<:Integer}(a::T,b::T,c::T) = ((a-b)-c)-1
julia> 2-3-4
-5

Are (+),(*) the only ops that can be n-ary specialized? What gives them 
that ability? Why only those?

Reply via email to