Yandex Home work on Haskell