Browse files

Make == Inf True

It occurred to me that we have many places in the core setting where we are
checking for whether a value is either Whatever or Inf.  It also occurred
to me that adding a Numeric method for Whatever would make such a check much
easier, because it would just allow you to say:

  sub a($value) { say "foo" if $value == Inf }

and pass either a(*) or a(Inf) would give the desired effect.  Before
applying this new capability, I thought I'd get it out in the world first.
  • Loading branch information...
lizmat committed Sep 15, 2015
1 parent 38c94bd commit 425845d723afb60d80dcca55b509ff1c1f9b303c
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/core/
@@ -1,6 +1,7 @@
my class Whatever {
multi method ACCEPTS(Whatever:D: $topic) { True }
multi method perl(Whatever:D:) { '*' }
multi method Numeric(Whatever:D:) { Inf }
my class HyperWhatever {

0 comments on commit 425845d

Please sign in to comment.