diff options
author | Leah Neukirchen <leah@vuxu.org> | 2022-11-26 18:06:19 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2022-11-26 18:06:19 +0100 |
commit | 2a0f96114fb75ecf6975812a041e96f7b9d161c5 (patch) | |
tree | 5b6753580edd6aec550f8d00f7177ca1f7d453b9 /mew.svnwiki | |
parent | b33a8d20e524ecf57568a3af8e814a7fb3f7dd62 (diff) | |
download | mew-2a0f96114fb75ecf6975812a041e96f7b9d161c5.tar.gz mew-2a0f96114fb75ecf6975812a041e96f7b9d161c5.tar.xz mew-2a0f96114fb75ecf6975812a041e96f7b9d161c5.zip |
add shuffle
Diffstat (limited to 'mew.svnwiki')
-rw-r--r-- | mew.svnwiki | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/mew.svnwiki b/mew.svnwiki index 5c955ed..6898888 100644 --- a/mew.svnwiki +++ b/mew.svnwiki @@ -511,17 +511,21 @@ When the pattern {{<irx>}} uses match data, the result is unspecified. Mew initializes the {{(chicken random)}} generator from a high entropy source. -<procedure>(rand)<procedure> +<procedure>(rand)</procedure> Returns a random real between 0 and 1. -<procedure>(rand N)<procedure> +<procedure>(rand <N>)</procedure> -Returns a random integer such that 0 <= {{(rand N)}} < {{N}}. +Returns a random integer such that 0 <= {{(rand <N>)}} < {{<N>}}. -<procedure>(rand N M)<procedure> +<procedure>(rand <N> <M>)</procedure> -Returns a random integer such that N <= {{(rand M)}} < {{M}}. +Returns a random integer such that N <= {{(rand <M>)}} < {{<M>}}. + +<procedure>(shuffle <vector>)</procedure> + +Shuffles the vector {{<vector>}} randomly in-place using a Fisher-Yates shuffle. == Special syntax |