Skip to content

Instantly share code, notes, and snippets.

@glguy
Last active August 4, 2018 16:52
Show Gist options
  • Save glguy/4007e35e40a53ca608c32214397a1bf7 to your computer and use it in GitHub Desktop.
Save glguy/4007e35e40a53ca608c32214397a1bf7 to your computer and use it in GitHub Desktop.
randomCoords :: StdGen -> [(Int,Int)]
randomCoords g = (rnx1, rny1) : randomCoords g2
where
(rnx1, g1) = randomR (1, heightMax) g
(rny1, g2) = randomR (1, widthMax) g1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment