Re: HUGS error: Unresolved overloading

2001-05-21 Thread Laszlo Nemeth
Hi Mark, isSorted xs = and (zipWith (=) xs (tail xs)) In other words: When is a list xs sorted? If each element in xs is less than or equal to its successor in the list (i.e., the corresponding element in tail xs). That's right ... under cbn! At the same time David's version with

RE: HUGS error: Unresolved overloading

2001-05-20 Thread Mark P Jones
Hi David, | 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 I'm branching away from your question, but