I'm trying to check if a list is sorted either ascending or descending in Haskell. I understand list comprehension the best in Haskell right now.
Currently, I have...
ascending l = [ x > (head(tail l))| x <- l]
and
descending l = [ x < (head (tail l))| x <- l]
but it's only comparing the each item in them list against one value and returning true and false whether it's greater or less than and that's not what I'm looking for. I want it to tell me if a list is true whether it's increasing or decreasing.