Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Restore [^^] and [xor].
  • Loading branch information
pmichaud committed Jun 25, 2012
1 parent 7d394e2 commit 53fc0ae
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/core/Bool.pm
Expand Up @@ -73,6 +73,16 @@ multi infix:<||>(Mu \$a, Mu \$b) { $a || $b }
proto infix:<^^>(|$) { * }
multi infix:<^^>(Mu $x = Bool::False) { $x }
multi infix:<^^>(Mu \$a, Mu \$b) { $a ^^ $b }
multi infix:<^^>(*@a) {
my $a = shift @a;
while @a {
my $b := shift @a;
next unless $b;
return Nil if $a;
$a := $b;
}
$a;
}

proto infix:<//>(|$) { * }
multi infix:<//>(Mu $x = Any) { $x }
Expand All @@ -89,6 +99,7 @@ multi infix:<or>(Mu \$a, Mu \$b) { $a || $b }
proto infix:<xor>(|$) { * }
multi infix:<xor>(Mu $x = Bool::False) { $x }
multi infix:<xor>(Mu \$a, Mu \$b) { $a ^^ $b }
multi infix:<xor>(*@a) { &infix:<^^>(@a); }

proto infix:<orelse>(|$) { * }
multi infix:<orelse>(Mu $x = Any) { $x }
Expand Down

0 comments on commit 53fc0ae

Please sign in to comment.