Some functions for random sampling
choose :: for_type a: (List(a)) -> List(a) pick :: for_type t: (List(t)) -> t random_nat :: (1) -> 1 sample :: for_type a: (List(a), 1) -> List(a) shuffle :: for_type a: (List(a)) -> List(a)
:: for_type a: (List(a)) -> List(a)
Random sublist/subset of the list. For each element it flips a coin to see whether it stays, or is removed.
:: for_type t: (List(t)) -> t
Picks a random elements from a list. Each element is equally likely.
:: (1) -> 1
Random natural number below n. Parameter n must be a non-zero natural number.
:: for_type a: (List(a), 1) -> List(a)
Random sublist/subset of a specific size. For each element it is equally likely that it stays, or is removed.
:: for_type a: (List(a)) -> List(a)
A random permutation of a list. Each permutation is equally likely.
Version v0.6.0, 2026-03-05T15:49:26.576138724+01:00[Europe/Amsterdam]