Re: Minimum & Maximum

new topic     » goto parent     » topic index » view thread      » older message » newer message

Thanks for spotting my *ahem* deliberate mistake Jiri.


Yours Truly
Michael Palffy

michael at igrin.co.nz
----------
> From: jiri babor <jbabor at PARADISE.NET.NZ>
> To: EUPHORIA at cwisserver1.mcs.muohio.edu
> Subject: Re: Minimum & Maximum
> Date: Friday, 25 September 1998 21:47
>
> Michael Palffy wrote:
>
> >How's this..
> >
> >function max(sequence a, sequence b)
> >        return a *(a>=b) + b *(b>a)
> >        end function
>
> Now we are really cooking, echos of c.r.white...
>
> First of all, just a minor thing, Mike, you probably want to change
> the parameter type from a sequence to an object, to cover plain atoms
> as well as sequences. So your min and max functions become
>
>     function min(object a, object b)
>         return a*(a<=b) + b*(b<a)
>     end function
>
>     function max(object a, object b)
>         return a*(a>=b) + b*(b>a)
>     end function
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu