Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!ukc!axion!clover!dwestlan From: dwestlan@axion.bt.co.uk (Dave Westland) Newsgroups: comp.lang.functional Subject: Re: Random number generator/script Message-ID: <1991May23.134621@axion.bt.co.uk> Date: 23 May 91 12:46:21 GMT Sender: news@axion.bt.co.uk Reply-To: dwestlan@axion.bt.co.uk (Dave Westland) Organization: British Telecom Research Labs Lines: 32 Multiple thanks to everyone who sent me scripts or references. I now have a working random # generator in Haskell, based on an ML library function, which goes something like this :- randlist :: Double -> [Double] randlist seed = r : (randlist r) -- infinite list where r = x - (fromInteger (floor x)) x = seed * 147.0 It's probably a bit more pseudo than random, but it's sufficient for my purposes. Cheers, Dave Westland. *-------------------------------------------------------* | DAVID WESTLAND | | BT Laboratories, Martlesham Heath, | | Ipswich. IP5 7RE U.K. | | Email : dwestlan@axion.bt.co.uk | | Tel. : (0473) 642156 Fax : (0473) 643019 | *-------------------------------------------------------* ``Now I've got that feeling once again I can't explain - you would not understand This is not how I am I have become comfortably numb.'' Pink Floyd. ---