Break an array into n equal or almost-equal sized sublists
Using roundrobin on a rotored array works

sub fair-lists ( @array, Int $num-lists ) {

  # "invert" the following "matrix"
  roundrobin

    # make it at least $num-lists long
    |@array[{ 0 ..^ ( $_ max $num-lists ) }]\

    # split it into chunks that are as big as the number of $num-lists
    .rotor: $num-lists, :partial

}




say fair-lists( 1..1, 3 ).perl;
# ((1,), (Any,), (Any,)).Seq

say fair-lists( 1..4, 3 ).perl;
# ((1, 4), (2,), (3,)).Seq


test it