Skip to content

Instantly share code, notes, and snippets.

Created November 1, 2016 15:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/c4c847ca058ce1595bcce349bab4a727 to your computer and use it in GitHub Desktop.
Save anonymous/c4c847ca058ce1595bcce349bab4a727 to your computer and use it in GitHub Desktop.
baggy-sym-diff.p6
-only sub infix:<(^)>(**@p) is pure {
+multi sub infix:<(^)>($a, $b) is pure {
+ ($a (-) $b) (+) ($b (-) $a)
+}
+multi sub infix:<(^)>(**@p) is pure {
Set.new(BagHash.new(@p.map(*.Set(:view).keys.Slip)).pairs.map({.key if .value == 1}));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment