Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add infix:<⊖> for set symmetric difference.
  • Loading branch information
colomon committed Jun 21, 2013
1 parent cb6f20b commit c536121
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/CORE.setting
Expand Up @@ -2268,9 +2268,10 @@ multi sub infix:<∖>(Any $a, Any $b --> Set) { $a.Set ∖ $b.Set }
multi sub infix:<>(Set $a, Set $b --> Set) { Set.new: $a.keys.grep: * $b }
only sub infix:<(-)>($a, $b --> Set) is equiv(&infix:<^>) { $a $b }
proto sub infix:<(^)>($, $ --> Set) is equiv(&infix:<^>) {*}
multi sub infix:<(^)>(Any $a, Any $b --> Set) { $a.Set (^) $b.Set }
multi sub infix:<(^)>(Set $a, Set $b --> Set) { ($a (-) $b) ($b (-) $a) }
proto sub infix:<>($, $ --> Set) is equiv(&infix:<^>) {*}
multi sub infix:<>(Any $a, Any $b --> Set) { $a.Set $b.Set }
multi sub infix:<>(Set $a, Set $b --> Set) { ($a (-) $b) ($b (-) $a) }
only sub infix:<(^)>($a, $b --> Set) is equiv(&infix:<^>) { $a $b }
# TODO: polymorphic eqv
# multi sub infix:<eqv>(Any $a, Any $b --> Bool) { $a.Set eqv $b.Set }
Expand Down

0 comments on commit c536121

Please sign in to comment.