In Mu§
See primary documentation in context for routine isa
multi method isa(Mu --> Bool)multi method isa(Str --> Bool)
Returns True
if the invocant is an instance of class $type
, a subset type or a derived class (through inheritance) of $type
. does
is similar, but includes roles.
my = 17;say .isa("Int"); # OUTPUT: «True»say .isa(Any); # OUTPUT: «True»;my = 0 but Truish;say .^name; # OUTPUT: «Int+{Truish}»say .does(Truish); # OUTPUT: «True»say .isa(Truish); # OUTPUT: «False»