[Haskell-beginners] Randomly selecting a data constructor

Evgenij Merenkov evgenij1 at hotmail.com
Sun Mar 14 07:21:41 EDT 2010


Thank you.

Subject: Re: [Haskell-beginners] Randomly selecting a data constructor
From: tom.davie at gmail.com
Date: Sun, 14 Mar 2010 11:08:59 +0000
CC: beginners at haskell.org
To: evgenij1 at hotmail.com




data FigType = TR1 | TR2 | TR3 | TR4 | SQ | L1 | L2 | Z1 | Z2 | Z3 | Z4 | NoFigure               deriving (Enum)
randomFigure :: IO FigTyperandomFigure = toEnum <$> randomRIO (1,11)
Bob 		 	   		  
_________________________________________________________________
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
https://signup.live.com/signup.aspx?id=60969
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20100314/8ac133de/attachment.html


More information about the Beginners mailing list