[julia-users] Re: Are (+), (*) the only ops that can use n-ary definitions?

2015-10-18 Thread Páll Haraldsson
On Tuesday, September 1, 2015 at 1:08:38 PM UTC, Jeffrey Sarnoff wrote: > > 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 > > Ar

[julia-users] Re: Are (+), (*) the only ops that can use n-ary definitions?

2015-10-18 Thread Páll Haraldsson
On Monday, October 19, 2015 at 1:00:33 AM UTC, Páll Haraldsson wrote: > > On Tuesday, September 1, 2015 at 1:08:38 PM UTC, Jeffrey Sarnoff wrote: >> >> 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 >>

[julia-users] Re: Are (+), (*) the only ops that can use n-ary definitions?

2015-10-21 Thread Jeffrey Sarnoff
good look -- thanks On Sunday, October 18, 2015 at 9:13:14 PM UTC-4, Páll Haraldsson wrote: > > On Monday, October 19, 2015 at 1:00:33 AM UTC, Páll Haraldsson wrote: >> >> On Tuesday, September 1, 2015 at 1:08:38 PM UTC, Jeffrey Sarnoff wrote: >>> >>> import Base:(+),(*),(-) >>> >>> julia> 2+3+4 >

[julia-users] Re: Are (+), (*) the only ops that can use n-ary definitions?

2015-10-21 Thread Jeffrey Sarnoff
I was thinking about continued fraction evaluation. Your 'misread' was very informative. I appreciate the detail -- that is very helpful. On Wednesday, October 21, 2015 at 3:50:52 PM UTC-4, Jeffrey Sarnoff wrote: > > good look -- thanks > > On Sunday, October 18, 2015 at 9:13:14 PM UTC-4, Páll Ha