|
|
Orchid XP v8 <voi### [at] devnull> wrote:
> One of the nice properties of Haskell is that since a function can have
> no side effects, you "only" need to check that it produces the correct
> output for every valid input.
Wait a minute... Exactly how do you create a random number generator in
Haskell?
A random number generator function is, by definition, a function which
returns different values every time it's called (with the exact same
parameters, eg. none), and to do that it must remember its state from
the previous call.
Not being able to create a RNG function would be rather restrictive in
many applications...
--
- Warp
Post a reply to this message
|
|