Simple genetic algorithm in haskell