P22 - Create a list containing all integers within a given range.

Author: Ryan Connelly

Example

> say range(5, 12)
5 6 7 8 9 10 11 12

Source code: P22-topo.pl

use v6;

sub range($lower, $upper)
{
    ($lower ... $upper).list;
}

say range(5, 20).perl;
say range(20, 5).perl;