actions
Nick Name
nick.name@inwind.it
Wed, 4 Dec 2002 19:06:17 +0100
On Wed, 4 Dec 2002 05:54:43 -0800 (PST)
Nuno Silva <nunopedrosilva@yahoo.com> wrote:
> descodificador = do c1 <- gera
> c2 <- gera
> c3 <- gera
> c4 <- gera
>
> "code in the middle to check if the
> number is equal"
>
> if not than go down...
>
> descodificador
Perhaps it's better to post the real code. Mind code layout first, and
if you create the random generator OUTSIDE the "descodificador" and use
one of the pure functions (not actions) to get a random number from it,
like "random", and reuse THE SAME generator, you will always get the
same number.
You can use the new generator obtained as the second element of the
resulting couple from the function "random" or the infinite list of
random numbers obtained with the function "randoms"
Vincenzo