mesh_shortest#
Interleave multiple arrays, stopping at the shortest.
Σύνοψη#
my @out = mesh_shortest \@a, \@b, \@c;
Τι επιστρέφεται#
A flat list containing elements at position 0 from each input, then 1, and so on - up to the length of the shortest input. No undef padding.
Παραδείγματα#
my @r = mesh_shortest [1..3], ['a','b']; # (1,'a', 2,'b')
my @r = mesh_shortest [1..3], []; # ()
Διαφορές από το upstream#
Fully compatible with upstream.
Δείτε επίσης#
mesh/mesh_longest- pad to longest instead.zip_shortest- same lockstep walk, but yields one arrayref per row.