Overview Clamps Packages CM Dictionary Clamps Dictionary Fomus
Next: phasor* , Previous: path-find-file , Up: P , Home: Overview

Clamps Dictionary

permute

Function

(permute list permutation)

Return a permutation of list according to the indexes in permutation.

Arguments

list List of elements to be permuted.
permutation List of permutation indexes.

Examples

(permute '(1 2 3 4 5) '(3 1 4 2 0)) ; => (4 2 5 3 1)

Note

For a valid permutation the permutation index list should contain all integer indexes of list starting from zero. In that case, length of list is equal to the length of permutation. If it is shorter, an error occurs, if it is longer, not all elements of list are returned.

Author: Orm Finnendahl

Created: 2025-02-18 Di 12:58

Validate