Skip to content

Instantly share code, notes, and snippets.

@robertberry-zz
Created February 18, 2014 14:30
Show Gist options
  • Save robertberry-zz/9072075 to your computer and use it in GitHub Desktop.
Save robertberry-zz/9072075 to your computer and use it in GitHub Desktop.
intervals :: Integer -> [Float]
intervals n = [-1.0 + (fromIntegral i) * interval | i <- [0 .. (n - 1)]]
where interval = 2.0 / (fromIntegral (n - 1))
main = print $ intervals 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment