Skip to content

Commit

Permalink
Don't need to create a Seq object when recursing in flat
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Dec 25, 2019
1 parent e8a9e07 commit 17d8116
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core.c/Iterable.pm6
Expand Up @@ -42,7 +42,7 @@ my role Iterable {
nqp::if(
nqp::istype(got,Iterable),
nqp::stmts(
($!nested := got.flat.iterator),
($!nested := Flat.new(got.iterator)),
self.pull-one
),
got
Expand All @@ -67,7 +67,7 @@ my role Iterable {
target.push(got),
nqp::if(
nqp::istype(got,Iterable),
got.flat.iterator.push-all(target),
Flat.new(got.iterator).push-all(target),
target.push(got)
)
)
Expand Down

0 comments on commit 17d8116

Please sign in to comment.