Modeling the evolution of cooperation using haskell