S is a sorted list of K unique random integers in the range
1..N. Implemented by enumerating 1..N and deciding whether or
not the number should be part of the set. For example:
?- randset(5, 5, S).
S = [1, 2, 3, 4, 5]. (always)
?- randset(5, 20, S).
S = [2, 7, 10, 19, 20].
- See also
- - randseq/3.
- bug
- - Slow if N is large and K is small.