diff options
author | Leah Neukirchen <leah@vuxu.org> | 2022-11-26 17:47:30 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2022-11-26 17:47:30 +0100 |
commit | b33a8d20e524ecf57568a3af8e814a7fb3f7dd62 (patch) | |
tree | d65285cdcf2697355b78748ebfaf174d959854d4 /mew.svnwiki | |
parent | 3360494dad789393fad412207dfc0b497dac887f (diff) | |
download | mew-b33a8d20e524ecf57568a3af8e814a7fb3f7dd62.tar.gz mew-b33a8d20e524ecf57568a3af8e814a7fb3f7dd62.tar.xz mew-b33a8d20e524ecf57568a3af8e814a7fb3f7dd62.zip |
add rand
Diffstat (limited to 'mew.svnwiki')
-rw-r--r-- | mew.svnwiki | 17 |
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> |