diff options
author | Leah Neukirchen <leah@vuxu.org> | 2022-11-27 16:27:10 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2022-11-27 16:27:10 +0100 |
commit | c53cde4625aba15a5f6f660e11fe91c61f5b6e24 (patch) | |
tree | 68a6d0a8bbc015ef097b5854c38bc0581810da47 /mew.svnwiki | |
parent | c5d3b30866dff0bbe3a2891ea4fcc3cd2d075d74 (diff) | |
download | mew-c53cde4625aba15a5f6f660e11fe91c61f5b6e24.tar.gz mew-c53cde4625aba15a5f6f660e11fe91c61f5b6e24.tar.xz mew-c53cde4625aba15a5f6f660e11fe91c61f5b6e24.zip |
extend sample to sample multiple elements without replacement
Diffstat (limited to 'mew.svnwiki')
-rw-r--r-- | mew.svnwiki | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mew.svnwiki b/mew.svnwiki index 7d5dce7..f27a8bd 100644 --- a/mew.svnwiki +++ b/mew.svnwiki @@ -536,6 +536,14 @@ Shuffles the vector {{<vector>}} randomly in-place using a Fisher-Yates shuffle. Returns a random element of the list/vector/string {{<obj>}}. Returns a random key/value pair of the hash-table {{<obj>}}. +<procedure>(sample <obj> <N>)</procedure> + +Returns a random list/vector/string consisting of {{<N>}} elements of +the list/vector/string {{<obj>}}, without replacement. + +Returns a random hash-table consisting of {{<N>}} key/value pairs of +the hash-table {{<obj>}}, without replacement. + == Special syntax |