[Haskell-cafe] Producing MinimumValue

Antoine Latter aslatter at gmail.com
Thu Jul 19 15:45:58 EDT 2007


On 7/19/07, Dan Weston <westondan at imageworks.com> wrote:
>
> I would define:
>
> allEqual []         = True
> allEqual [_]        = True
> allEqual (x1:x2:xs) = (x1 == x2) && allEqual xs

What does this function do for "allEqual [1, 1, 2]" ?

Antoine


More information about the Haskell-Cafe mailing list