Test integerness: Difference between revisions

→‎{{header|Perl 6}}: some explanations
m (→‎{{header|REXX}}: change wording in a comment (used full word, not an abbreviation).)
(→‎{{header|Perl 6}}: some explanations)
Line 126:
 
=={{header|Perl 6}}==
 
In Perl 6, classes that implement the Numeric role have a method called <tt>narrow</tt> which returns an object with the same value but with the most appropriate type. So we can just test the type of ''that'' object.
 
<lang perl6>for pi, 1e5, 1+0i {
1,934

edits