Random Latin squares: Difference between revisions

m
Line 73:
sub random ( @ls, :$size = 5 ) {
 
# Build
for 2 ..^ $size -> $i {
@ls[$i] = @ls[0].clone;
Line 78 ⟶ 79:
}
 
# Shuffle
@ls = @ls[^$size .pick(*)];
my @cols = ^$size .pick(*);
Line 84 ⟶ 86:
# Some random Latin glyphs
my @symbols = ('Ŋ' .. 'ž').pick($size);
 
@ls.deepmap: { $_ = @symbols[$_] };
 
10,339

edits