Permalink
Browse files

I reckon multi-subset and -superset should work with anything.

This reflects the behavior of regular subset and superset.
  • Loading branch information...
1 parent d2580c9 commit 480a062e569da62b58b7ae985795ee6f19aa57e2 @colomon colomon committed Jun 11, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/CORE.setting
View
@@ -2431,9 +2431,11 @@ multi sub infix:<⊎>(Bag $a, Bag $b --> Bag) {
only sub infix:<(+)>($a, $b --> Bag) is equiv(&infix:<&>) { $a $b }
multi sub infix:<≼>(Baggy $a, Baggy $b --> Bool) { so all $a.keys.map({ $a{$_} <= $b{$_} }) }
+multi sub infix:<≼>(Any $a, Any $b --> Bool) { $a.Bag $b.Bag }
proto sub infix:<≽>($, $ --> Bool) is equiv(&infix:<==>) {*}
multi sub infix:<≽>(Baggy $a, Baggy $b --> Bool) { so all $b.keys.map({ $b{$_} <= $a{$_} }) }
+multi sub infix:<≽>(Any $a, Any $b --> Bool) { $a.Bag $b.Bag }
class KeyBag does Associative does Baggy {
has Int %!elems; # should be UInt

0 comments on commit 480a062

Please sign in to comment.