On 12/31/05, Marc Weber <[EMAIL PROTECTED]> wrote:
> Hi.. I'm still struggling with monads ;-)
>
> In the tutorial "All about monads" there is the function getOne used:
>
> getOne:: (Random a) => (a,a) -> State StdGen a
> getOne bound = do g <-get
> (x,g')= return $ randomR bounds
Hi.. I'm still struggling with monads ;-)
In the tutorial "All about monads" there is the function getOne used:
getOne:: (Random a) => (a,a) -> State StdGen a
getOne bound = do g <-get
(x,g')= return $ randomR bounds g
put g'
return x
In the