Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Allow for .sleep on numbers
Getting tired of typing "sleep $_" all the time, while ".sleep" sits in my fingers
  • Loading branch information
lizmat committed Apr 3, 2014
1 parent 09fbdc7 commit 972ef02
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/Numeric.pm
Expand Up @@ -27,6 +27,8 @@ my role Numeric {

method succ() { self + 1 }
method pred() { self - 1 }

method sleep() { sleep self }
}

multi sub infix:<eqv>(Numeric:D $a, Numeric:D $b) {
Expand Down

0 comments on commit 972ef02

Please sign in to comment.