Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use faster Pair creation for Sets
  • Loading branch information
lizmat committed Oct 21, 2015
1 parent 3087de7 commit a594769
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Set.pm
Expand Up @@ -18,10 +18,10 @@ my class Set does Setty {
}

multi method pairs(Set:D:) { # must copy else we can change the Set
%!elems.values.map: { Pair.new(:key($_),:value(True)) };
%!elems.values.map: { Pair.new($_,True) };
}
multi method antipairs(Set:D:) { # must copy else we can change the Set
%!elems.values.map: { Pair.new(:key(True),:value($_)) };
%!elems.values.map: { Pair.new(True,nqp::decont($_)) };
}

method Set { self }
Expand Down

0 comments on commit a594769

Please sign in to comment.