NAME
Util::Underscore::ListUtils - Interface to List::Util and List::MoreUtils
VERSION
version v1.2.1
FUNCTION REFERENCE
$scalar = _::reduce { BLOCK } @list
-
wrapper for
List::Util::reduce
$bool = _::any { PREDICATE } @list
-
wrapper for
List::Util::any
$bool = _::all { PREDICATE } @list
-
wrapper for
List::Util::all
$bool = _::none { PREDICATE } @list
-
wrapper for
List::Util::none
$scalar = _::first { PREDICATE } @list
-
wrapper for
List::MoreUtils::first_value
$int = _::first_index { PREDICATE } @list
-
wrapper for
List::MoreUtils::first_index
$scalar = _::last { PREDICATE } @list
-
wrapper for
List::MoreUtils::last_value
$int = _::last_index { PREDICATE } @list
-
wrapper for
List::MoreUtils::last_index
$num = _::max @list
$str = _::max_str @list
-
wrappers for
List::Util::max
andList::Util::maxstr
, respectively. $num = _::min @list
$str = _::min_str @list
-
wrappers for
List::Util::min
andList::Util::minstr
, respectively. $num = _::sum 0, @list
-
wrapper for
List::Util::sum
$num = _::product @list
-
wrapper for
List::Util::product
%kvlist = _::pairgrep { PREDICATE } %kvlist
-
wrapper for
List::Util::pairgrep
($k, $v) = _::pairfirst { PREDICATE } %kvlist
-
wrapper for
List::Util::pairfirst
%kvlist = _::pairmap { BLOCK } %kvlist
-
wrapper for
List::Util::pairmap
@list = _::shuffle @list
-
wrapper for
List::Util::shuffle
$iter = _::natatime $size, @list
-
wrapper for
List::MoreUtils::natatime
@list = _::zip \@array1, \@array2, ...
-
wrapper for
List::MoreUtils::zip
Unlike
List::MoreUtils::zip
, this function directly takes array references, and not array variables. It still uses the same implementation. This change makes it easier to work with anonymous arrayrefs, or other data that isn't already inside a named array variable. @list = _::uniq @list
-
wrapper for
List::MoreUtils::uniq
@list = _::part { INDEX_FUNCTION } @list
-
wrapper for
List::MoreUtils::part
$iter = _::each_array \@array1, \@array2, ...
-
wrapper for
List::MoreUtils::each_arrayref
BUGS
Please report any bugs or feature requests on the bugtracker website https://github.com/latk/Underscore/issues
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.
AUTHOR
Lukas Atkinson <amon@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2014 by Lukas Atkinson.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007