Clamps Dictionary
group-by
Function
(group-by list group-lengths)
Partition list into sublists of lengths given by group-lenghts cyclically.
Arguments
list |
The list to partition. |
group-lenghts |
List of Positive Integers denoting the sequence of lengths of the partitions. |
Example
(group-by '(1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6) '(2 3 5)) ;; => ((1 2) (3 4 5) (6 7 8 9 1) (2 3) (4 5 6) (7 8 9 1 2) (3 4) (5 6))
Created: 2025-02-18 Di 12:58