Post test!

:)

Haskell test:

import Data.List

compress :: Eq a => [a] -> [a]
compress (x:y:zs)
| x == y   = compress(y:zs)
| otherwise = x : compress(y:zs)
compress ys = ys

main = print (compress ['a', 'a', 'a', 'b', 'a'])

Python test:

print("test")
comments powered by Disqus