I can't figure out how to generate random number.
Here is how I'm trying to do according to this:
main :: IO ()
main = do
let
g <- getStdGen
bla = randomRs (0, 360) g
Also tried:
main :: IO ()
main = do
let
r <- randomIO
then:
parse error on input `<-' Perhaps this statement should be within a 'do' block?
Aucun commentaire:
Enregistrer un commentaire