summary refs log tree commit diff
path: root/mew.svnwiki
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2022-11-26 17:47:30 +0100
committerLeah Neukirchen <leah@vuxu.org>2022-11-26 17:47:30 +0100
commitb33a8d20e524ecf57568a3af8e814a7fb3f7dd62 (patch)
treed65285cdcf2697355b78748ebfaf174d959854d4 /mew.svnwiki
parent3360494dad789393fad412207dfc0b497dac887f (diff)
downloadmew-b33a8d20e524ecf57568a3af8e814a7fb3f7dd62.tar.gz
mew-b33a8d20e524ecf57568a3af8e814a7fb3f7dd62.tar.xz
mew-b33a8d20e524ecf57568a3af8e814a7fb3f7dd62.zip
add rand
Diffstat (limited to 'mew.svnwiki')
-rw-r--r--mew.svnwiki17
1 files changed, 17 insertions, 0 deletions
diff --git a/mew.svnwiki b/mew.svnwiki
index 09c6d86..5c955ed 100644
--- a/mew.svnwiki
+++ b/mew.svnwiki
@@ -507,6 +507,23 @@ irregex {{<irx>}} in the string {{<str>}}, at most {{<max>>} times
 When the pattern {{<irx>}} uses match data, the result is unspecified.
 
 
+== Random numbers
+
+Mew initializes the {{(chicken random)}} generator from a high entropy source.
+
+<procedure>(rand)<procedure>
+
+Returns a random real between 0 and 1.
+
+<procedure>(rand N)<procedure>
+
+Returns a random integer such that 0 <= {{(rand N)}} < {{N}}.
+
+<procedure>(rand N M)<procedure>
+
+Returns a random integer such that N <= {{(rand M)}} < {{M}}.
+
+
 == Special syntax
 
 <syntax>(-> a -> b c -> d e f)</syntax>