I'm using an action that generates a random number, for the user to discover it. each time he guesses, if the number is diferent that the one generated, it is suposed to call itself again to try again, but each time I call it, it generates the number again.

how can I overcome this?

sample of the code:

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

 

 



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now