Nate Cook
eb93e564d4
Add Sequence.randomElement()
...
The stdlib's randomElement() method extends Collection, since it
operates by selecting a random index. This adds randomElement() as
a Sequence method, specializing the reservoir sampling algorithm
from randomSample(count:) for a count of 1.
2022-03-07 18:17:41 -06:00
..
2021-09-09 01:01:36 +02:00
2021-09-09 01:01:36 +02:00
2021-09-09 01:01:36 +02:00
2021-01-14 13:32:47 -06:00
2021-09-09 01:01:36 +02:00
2021-04-07 14:57:26 -05:00
2021-03-23 19:55:33 +01:00
2020-12-01 15:47:13 -06:00
2021-09-09 01:01:36 +02:00
2021-09-09 01:01:36 +02:00
2021-05-13 12:31:13 -05:00
2021-12-16 07:10:17 -06:00
2021-02-12 06:32:32 -08:00
2021-09-09 01:01:36 +02:00
2022-03-07 18:17:41 -06:00
2021-09-09 01:01:36 +02:00
2021-02-15 13:31:34 -08:00
2021-09-09 01:01:36 +02:00
2021-09-09 01:01:36 +02:00
2021-03-09 20:03:55 +01:00
2022-03-07 18:14:08 -06:00
2021-05-25 12:50:03 -05:00
2021-03-24 15:17:27 +01:00
2021-04-07 14:51:11 -05:00
2021-09-09 01:01:36 +02:00