Range::Iter - Generate a coderef iterator for range
This document describes version 0.001 of Range::Iter (from Perl distribution Range-Iter), released on 2019-04-16.
use Range::Iter qw(range_iter); my $iter = range_iter(1, 10); while (my $val = $iter->()) { ... } # 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
You can add step:
my $iter = range_iter(1, 10, 2); # 1, 3, 5, 7, 9
Anything that can be incremented by Perl is game:
$iter = range_iter("a", "e"); # a, b, c, d, e
Please visit the project's homepage at https://metacpan.org/release/Range-Iter.
Source repository is at https://github.com/perlancar/perl-Range-Iter.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Range-Iter
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Array::Iter
perlancar <perlancar@cpan.org>
This software is copyright (c) 2019 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Range::Iter, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Range::Iter
CPAN shell
perl -MCPAN -e shell install Range::Iter
For more information on module installation, please visit the detailed CPAN module installation guide.