Skip to content

Commit 6db1438

Browse files
giacomocavalierilpil
authored andcommitted
Add helpful link to documentation
1 parent 477b10b commit 6db1438

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/gleam/list.gleam

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2301,8 +2301,9 @@ fn max_loop(list, compare, max) {
23012301
}
23022302
}
23032303

2304-
/// Take a random sample of k elements from a list using reservoir sampling via
2305-
/// Algo L. Returns an empty list if the sample size is less than or equal to 0.
2304+
/// Returns a random sample of up to n elements from a list using reservoir
2305+
/// sampling via [Algorithm L](https://en.wikipedia.org/wiki/Reservoir_sampling#Optimal:_Algorithm_L).
2306+
/// Returns an empty list if the sample size is less than or equal to 0.
23062307
///
23072308
/// Order is not random, only selection is.
23082309
///

0 commit comments

Comments
 (0)