previous up contents next
Left: Mode Up: Standard library function functions Right: Readline


Permute returns a random permutation of all the items in the type relevant path prefix (followed by the rest of the path). The (implicitly invoked) random number generator can be explicitly seeded with the # seed directive.

Permute can easily be used to define other nondeterministic functions.

    PickAnyOneOf:<> == First:<Permute>.
    RandomDigit:<> == First:<Permute:<Series: 1 1 10>>.
    RandomSample:<$N> == Subseq:<0 $N Permute>.


Copyright © Roger Evans, Gerald Gazdar & Bill Keller, Tuesday 10 November 1998