In Mu§
See primary documentation in context for method WHICH
multi method WHICH(--> ObjAt)
Returns an object of type ObjAt
which uniquely identifies the object. Value types override this method which makes sure that two equivalent objects return the same return value from WHICH
.
say 42.WHICH eq 42.WHICH; # OUTPUT: «True»
In IO::Special§
See primary documentation in context for method WHICH
method WHICH(IO::Special: --> Str)
This returns a string that identifies the object. The string is composed by the type of the instance (IO::Special
) and the what
attribute:
.path.what; # OUTPUT: «<STDIN>».path.WHICH; # OUTPUT: «IO::Special<STDIN>»
In Allomorph§
See primary documentation in context for method WHICH
multi method WHICH(Allomorph:)
Returns an object of type ValueObjAt
which uniquely identifies the object.
my = <42.1e0>;say .WHICH; # OUTPUT: «NumStr|Num|42.1|Str|42.1e0»
In Range§
See primary documentation in context for method WHICH
multi method WHICH (Range:)
This returns a string that identifies the object. The string is composed by the type of the instance (Range
) and the min
and max
attributes:
say (1..2).WHICH # OUTPUT: «Range|1..2»