Simple try functionaly programming on Haskell