Re: Minimum & Maximum
- Posted by mike <michael at IGRIN.CO.NZ> Sep 26, 1998
- 532 views
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 >