Re: Is there something wrong with random function?
Jean Louis <[email protected]> Fri, 17 Nov 2017 07:13:51 +0300
| Newsgroups | gmane.lisp.clisp.general |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Nov 16, 2017 at 03:21:08PM -0500, Sam Steingold wrote: > > * Jean Louis <[email protected]> [2017-11-16 20:22:05 +0300]: > > > > (defun random-number (&key (digits 6)) > > "Returns the random number with 6 digits by default" > > (setf *random-state* (make-random-state)) > > make-random-state is a relatively expensive > function, calling it every time you need a > random number is _not_ a good idea from any POV. I see, now I run it once per program execution. Jean ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ clisp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-list