Best regards.

]]>sorted :: (Ord a) => [a] -> Bool

sorted [] = True

sorted (_:[]) = True

sorted lst @ (x:y:xs) = x [a] -> [a]

bubbleSort [] = []

bubbleSort a @ (_:[]) = a

bubbleSort lst = until(sorted)(\(x:y:xs) -> (min x y) : bubbleSort((max x y) : xs)) lst