Skip to content

Commit 3a4034c

Browse files
committed
Explicitly flatten in Sierpinski triangle
1 parent 5b958fe commit 3a4034c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rosettacode/sierpinski_triangle.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ sub sierpinski ($n) {
1212
my @down = '*';
1313
my $space = ' ';
1414
for ^$n {
15-
@down = @down.map({"$space$_$space"}), @down.map({"$_ $_"});
15+
@down = flat @down.map({"$space$_$space"}), @down.map({"$_ $_"});
1616
$space ~= $space;
1717
}
1818
return @down;

0 commit comments

Comments
 (0)