compress (x:xs)
    | x == head xs = compress xs
    | otherwise    = x:compress xs
compress (x:xs)
    | x == head xs = compress xs
    | otherwise    = x:compress xs
compress (x:xs)
    | x == head xs = compress xs
    | otherwise    = x:compress xs