aboutsummaryrefslogtreecommitdiff
path: root/man/man3/tomo-List.sample.3
diff options
context:
space:
mode:
Diffstat (limited to 'man/man3/tomo-List.sample.3')
-rw-r--r--man/man3/tomo-List.sample.36
1 files changed, 3 insertions, 3 deletions
diff --git a/man/man3/tomo-List.sample.3 b/man/man3/tomo-List.sample.3
index 833ea350..7bf6196a 100644
--- a/man/man3/tomo-List.sample.3
+++ b/man/man3/tomo-List.sample.3
@@ -2,14 +2,14 @@
.\" Copyright (c) 2025 Bruce Hill
.\" All rights reserved.
.\"
-.TH List.sample 3 2025-04-21T14:54:02.045271 "Tomo man-pages"
+.TH List.sample 3 2025-04-21T14:58:16.946951 "Tomo man-pages"
.SH NAME
List.sample \- weighted random choices
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
-.BI List.sample\ :\ func(list:\ [T],\ count:\ Int,\ weights:\ [Num]?\ =\ ![Num],\ random:\ func(->Num)?\ =\ none\ ->\ [T])
+.BI List.sample\ :\ func(list:\ [T],\ count:\ Int,\ weights:\ [Num]?\ =\ none,\ random:\ func(->Num)?\ =\ none\ ->\ [T])
.fi
.SH DESCRIPTION
Selects a sample of elements from the list, optionally with weighted probabilities.
@@ -24,7 +24,7 @@ l l l l.
Name Type Description Default
list [T] The list to sample from. -
count Int The number of elements to sample. -
-weights [Num]? The probability weights for each element in the list. These values do not need to add up to any particular number, they are relative weights. If no weights are given, elements will be sampled with uniform probability. ![Num]
+weights [Num]? The probability weights for each element in the list. These values do not need to add up to any particular number, they are relative weights. If no weights are given, elements will be sampled with uniform probability. none
random func(->Num)? If provided, this function will be used to get random values for sampling the list. The provided function should return random numbers between `0.0` (inclusive) and `1.0` (exclusive). (Used for deterministic pseudorandom number generation) none
.TE
.SH RETURN