Next: , Previous: , Up: random utils   [Index]


49.7.2 Specialised list functions

The auxiliary library (vicare crypto randomisations lists) exports bindings specialised to handle lists and randomness sources; it is based on (vicare crypto randomisations) only.

Function: random-list-unfold-numbers number-maker number-of-numbers

Given the closure number-maker returning a random number, build and return a new list of number-of-numbers random numbers.

Function: random-list-shuffle ell source

Build and return a new list shuffling the elements of ell using randomness from the given source.

Function: random-list-sample ell source

Return a closure that, when evaluated with no arguments, returns a randomly selected item from ell, using randomness from source.

Function: random-list-sample-population ell len source

Return a closure that, when evaluated with no arguments, returns a list of len items randomly selected from ell, using randomness from source.