feat: add sample(list) and sample(list, count) methods to Random class with two sampling algorithms
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
import "random" for Random
|
||||
|
||||
var random = Random.new(12345)
|
||||
|
||||
System.print(random.sample([], 0)) // expect: []
|
||||
System.print(random.sample([1, 2, 3], 0)) // expect: []
|
||||
Reference in New Issue
Block a user