David Scarlett wrote:
>
> Can anyone shed some light on the following error? Thanks in advance.
>
> isSorted :: Ord a => [a] -> Bool
> isSorted [] = True
> isSorted [x] = True
> isSorted (x1:x2:xs)
> | x1 <= x2 = isSorted (x2:xs)
> | otherwise = False
>
>
[...]
> Mai
Can anyone shed some light on the following error? Thanks in advance.
isSorted :: Ord a => [a] -> Bool
isSorted [] = True
isSorted [x] = True
isSorted (x1:x2:xs)
| x1 <= x2 = isSorted (x2:xs)
| otherwise = False
Hugs session for:
/usr/local/share/hugs/lib/Prelude.hs
has