challenge: implement the max function

Jari-Matti Mäkelä jmjmak at utu.fi.invalid
Tue Jan 23 04:30:40 PST 2007


Jari-Matti Mäkelä wrote:
> Just out of curiosity, what is happening here? If I write
> 
>   else return arg[0] >= arg[1] ? max(arg[0]) : max(arg[1], arg[2..$]);
> 
> it does not work, but
> 
>   else return max(arg[0] >= arg[1] ? arg[0] : arg[1], arg[2..$]);
> 
> works.

Ok, now I got it. Got a bit distracted by other languages.



More information about the Digitalmars-d mailing list