RandomSubset |
Syntax |
RandomSubset(L: LIST, K: INT): LIST |
Description |
Example |
/**/ RandomSubset(["a","b","c","d","e","f","g","h"], 5); ["a", "c", "d", "f", "h"] /**/ indent([RandomSubset(1..1000, 10) | i in 1..4]); [ [160, 182, 215, 219, 349, 588, 628, 811, 886, 905], [23, 103, 315, 451, 531, 539, 571, 846, 858, 876], [24, 230, 240, 278, 380, 421, 495, 505, 665, 788], [81, 274, 299, 378, 414, 616, 828, 844, 870, 946] ] /**/ binomial(1000, 10); --> too many to fit in memory ;-) 263409560461970212832400 |
See Also |