Random number generator (included): Difference between revisions
Content deleted Content added
→{{header|Vlang}}: Rename "Vlang" in "V (Vlang)" |
Hendursaga (talk | contribs) m Fix incorrect function name, remove incorrect notice, & add note. |
||
Line 208:
=={{header|Common Lisp}}==
The easiest way to generate random numbers in Common Lisp is to use the built-in rand function after seeding the random number generator. For example, the first line seeds the random number generator and the second line generates a number from 0 to 9
<syntaxhighlight lang="lisp">(setf *random-state* (make-random-state t))
(
[https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node133.html Common Lisp: The Language, 2nd Ed.] does not specify a specific random number generator algorithm, nor a way to use a user-specified seed.
=={{header|D}}==
|