Skip to content

Commit

Permalink
Allow for "does Rational" and "does Rational[foo]"
Browse files Browse the repository at this point in the history
From a question by cschwenz++ on #perl6
  • Loading branch information
lizmat committed Jun 29, 2017
1 parent d5bf5b0 commit 41ed2c0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/Rational.pm
@@ -1,3 +1,5 @@
my role Rational does Rational[Int] { }
my role Rational[::T] does Rational[T,T] { }
my role Rational[::NuT, ::DeT] does Real {
has NuT $.numerator = 0;
has DeT $.denominator = 1;
Expand Down

0 comments on commit 41ed2c0

Please sign in to comment.