[Haskell-cafe] Producing MinimumValue

Bulat Ziganshin bulat.ziganshin at gmail.com
Fri Jul 20 10:32:44 EDT 2007


Hello Benja,

Friday, July 20, 2007, 6:10:15 PM, you wrote:
> My natural instinct is,

> allEqual [] = True
> allEqual (x:xs) = all (== x) xs

> with the same caveat about allEqual [] as in your case.

allEqual xs  =  all (== head xs) xs

-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list