Iterator::UtilIterator::Util Perl package contains essential utilities for the Iterator class. | |
Download |
Iterator::Util Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Eric J. Roode
- Publisher web site:
- http://search.cpan.org/~roode/
Iterator::Util Tags
Iterator::Util Description
Iterator::Util Perl package contains essential utilities for the Iterator class. Iterator::Util Perl package contains essential utilities for the Iterator class.SYNOPSIS use Iterator::Util; # Transform sequences $iterator = imap { transformation code } $some_other_iterator; # Filter sequences $iterator = igrep { condition code } $some_other_iterator; # Range of values (arithmetic sequence) $iter = irange ($start, $end, $increment); $iter = irange ($start, $end); $iter = irange ($start); # Iterate over an arbitrary list $iter = ilist (item, item, ...); $iter = ilist (@items); # Iterate over an array, by reference $iter = iarray (@array); # Return at most $num items from an iterator $iter = ihead ($num, $some_other_iterator); @values = ihead ($num, $some_other_iterator); # Append multiple iterators into one $iter = iappend ($it1, $it2, $it3, ...); # Apply a function to pairs of iterator values $iter = ipairwise {code} $iter_A, $iter_B; # Skip the first $num values of an iterator $iter = iskip ($num, $some_other_iterator); # Skip values from an iterator until a condition is met $iter = iskip_until {code} $some_other_iterator; # Mesh iterators together $iter = imesh ($iter, $iter, ...); $iter = izip ($iter, $iter, ...); # Return each value of an iterator once $iter = iuniq ($another_iterator);This module implements many useful functions for creating and manipulating iterator objects.An "iterator" is an object, represented as a code block that generates the "next value" of a sequence, and generally implemented as a closure. For further information, including a tutorial on using iterator objects, see the Iterator documentation. Requirements: · Perl
Iterator::Util Related Software