编辑代码

sorted :: Ord a => [a] -> Bool
sorted [] = True
sorted [h] = True
sorted (h:t) 
    | h <= (head t) = sorted t
    | otherwise = False