Skip to content

Commit

Permalink
Implement ~ and ? prefix ops
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan O'Rear committed Jul 13, 2010
1 parent 02783f9 commit 332b344
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions setting
Expand Up @@ -303,4 +303,10 @@ sub prefix:<++>($v) { $v = ($v + 1); $v }
sub postfix:<-->($v) { my $old = $v; $v = ($v - 1); $old }
sub postfix:<++>($v) { my $old = $v; $v = ($v + 1); $old }

# actually a macro
# sub infix:<:=>($l,$r) { ... }

sub prefix:<~>($v) { $v.Str } # should be Stringy
sub prefix:<?>($v) { $v.Bool }

YOU_ARE_HERE;

0 comments on commit 332b344

Please sign in to comment.