Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Give Seq an "invert" method
there is no generic method in Any, so Seq needs one for %h.pairs.invert
to work
  • Loading branch information
moritz committed Aug 22, 2015
1 parent 5c0c7bc commit 7ccbe0d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/Seq.pm
Expand Up @@ -116,6 +116,8 @@ my class Seq is Cool does Iterable does PositionalBindFailover {
self.list.EXISTS-POS($idx)
}

multi method invert(Seq:D:) { self.List.invert }

# Lazy loops produce a Seq wrapping a loop iterator. We have a few
# special cases of that.
my class InfiniteLoopIter does SlippyIterator {
Expand Down

0 comments on commit 7ccbe0d

Please sign in to comment.