Solving of simple algorithmic problems in Haskell.