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
[incomprehensible (not necessarily wrong!) stuff about polynomials,
rings, modules over Z and complaints about the current prelude nuked]
--- Marcin 'Qrczak' Kowalczyk pisze ---
Please show a concrete proposal how Prelude classes could be improved.
--- Jerzy Karczmarczuk repondre ---
I am