Permalink
Browse files

Set/Bag are no longer Iterable, Any (implicitely so)

This solves the problem of sets/bags being flattened at most places
  • Loading branch information...
lizmat committed Sep 5, 2013
1 parent d5b47b7 commit a426d5a1d94cd9751e698fbabc9d2aa460006586
Showing with 2 additions and 4 deletions.
  1. +1 −2 src/core/Bag.pm
  2. +1 −2 src/core/Set.pm
View
@@ -44,7 +44,7 @@ only sub infix:<<"\x227D">>($a, $b --> Bool) {
$a (>+) $b;
}
-my class Bag is Iterable does Associative does Baggy {
+my class Bag does Associative does Baggy {
has %!elems; # should be UInt
method default(--> Int) { 0 }
@@ -124,7 +124,6 @@ my class Bag is Iterable does Associative does Baggy {
~ ')';
}
- method iterator() { %!elems.values.iterator }
method list() { self.keys }
method pairs() { %!elems.values }
View
@@ -166,7 +166,7 @@ only sub infix:<<"\x2285">>($a, $b --> Bool) {
$a !(>) $b;
}
-my class Set is Iterable does Associative {
+my class Set does Associative {
has %!elems;
method default(--> Bool) { False }
@@ -227,7 +227,6 @@ my class Set is Iterable does Associative {
~ ')';
}
- method iterator() { %!elems.values.iterator }
method list() { %!elems.values }
method pick($count = 1) { %!elems.values.pick($count) }
method roll($count = 1) { %!elems.values.roll($count) }

0 comments on commit a426d5a

Please sign in to comment.