How do functional languages handle random numbers?
- by Electric Coffee
What I mean about that is that in nearly every tutorial I've read about functional languages, is that one of the great things about functions, is that if you call a function with the same parameters twice, you'll always end up with the same result.
How on earth do you then make a function that takes a seed as a parameter, and then returns a random number based on that seed?
I mean this would seem to go against one of the things that are so good about functions, right? Or am I completely missing something here?