Hello,all

My intention is to generate 50 random coordinates like (x,y).

myrand :: Int
myrand = randomRIO(1::Int, 100)

rf=[(myrand, myrand) | a <- [1..50]]

My short program is like this. However, GHCI say that the return type of
randomRIO is IO a while the function defined by me is Int. Since I only need
a integral type as my cooridinate, could you tell me how to fix this?

Hank
-- 
View this message in context: 
http://www.nabble.com/Generate-50-random-coordinates-tf2742242.html#a7651116
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to