Reimplementing polygonal map generation in Haskell