Cyrus Innovation code test implemented in Haskell