[Haskell-cafe] Producing MinimumValue

Benja Fallenstein benja.fallenstein at gmail.com
Fri Jul 20 10:46:57 EDT 2007


2007/7/20, Bulat Ziganshin <bulat.ziganshin at gmail.com>:
> > allEqual [] = True
> > allEqual (x:xs) = all (== x) xs
>
> > with the same caveat about allEqual [] as in your case.
>
> allEqual xs  =  all (== head xs) xs

Riiiight. Not evaluated in the edge case, because xs is empty. Didn't
think of that, nice :-)

- Benja


More information about the Haskell-Cafe mailing list