2022-10-27 00:27:41 +02:00
|
|
|
factorial := (n | fold '* (1 + up n));
|
2022-06-02 23:17:02 +02:00
|
|
|
|
|
|
|
|
2022-10-25 16:10:34 +02:00
|
|
|
list_all_permutations := ( array |
|
|
|
|
for (up (factorial (len array))) (|
|
|
|
|
say array;
|
|
|
|
array = permute array;
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
list_all_permutations (1 + up 5);
|