Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Explicitly flatten in Sierpinski triangle
  • Loading branch information
moritz committed Aug 23, 2015
1 parent 5b958fe commit 3a4034c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rosettacode/sierpinski_triangle.t
Expand Up @@ -12,7 +12,7 @@ sub sierpinski ($n) {
my @down = '*';
my $space = ' ';
for ^$n {
@down = @down.map({"$space$_$space"}), @down.map({"$_ $_"});
@down = flat @down.map({"$space$_$space"}), @down.map({"$_ $_"});
$space ~= $space;
}
return @down;
Expand Down

0 comments on commit 3a4034c

Please sign in to comment.