Anonymous user
Range consolidation: Difference between revisions
→{{header|Perl}}: Add link.
(→{{header|Perl}}: Add link.) |
(→{{header|Perl}}: Add link.) |
||
Line 502:
=={{header|Perl}}==
Note: the output is shown in the standard [https://perldoc.perl.org/perlop.html#Range-Operators Perl notation for Ranges].
<lang perl>use strict;
use warnings;
Line 543 ⟶ 546:
In Perl 6, a Range is a first class object with its own specialized notation. Perl 6 Ranges allow for exclusion of the boundary numbers. This example doesn't since it isn't a requirement in this task. Much of the logic is lifted from the [[Set_of_real_numbers#Perl_6|Set_of_real_numbers]] task with simplified logic for the much simpler requirements.
Note: the output is in standard
<lang perl6># Union
|