[Haskell-beginners] How to process a list that contains "undefined" values?

Mike Meyer mwm at mired.org
Sun Jul 3 08:40:03 CEST 2011


On Sat, 2 Jul 2011 16:32:37 +0200
Daniel Fischer <daniel.is.fischer at googlemail.com> wrote:

> On Saturday 02 July 2011, 16:09:05, Costello, Roger L. wrote:
> > Hi Folks,
> > 
> > How would you find the maximum value in this list:
> > 
> >      [undefined, 10, undefined, 20]
> Not. There is no proper maximum in the presence of undefined.

Doesn't that mean the maximum value for this list is also "undefined"?
That matches my intuition, which is that undefined should be a
"contagious" value, so that any value that depends on evaluating an
undefined value is itself undefined.

      <mike
-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/
Independent Software developer/SCM consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org



More information about the Beginners mailing list