In role Numeric§
See primary documentation in context for method narrow
method narrow(Numeric:D --> Numeric:D)
Returns the number converted to the narrowest type that can hold it without loss of precision.
say (4.0 + 0i).narrow.raku; # OUTPUT: «4» say (4.0 + 0i).narrow.^name; # OUTPUT: «Int»