List::...::Array(3pm)

πŸ“¦
version 2.028003 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

hey bestie, welcome to List::...::Array(3pm) β€” aka List::Objects::WithUtils::Role::Array β€” Array manipulation methods. she's giving utility role realness and we are obsessed. 🫢✨

List::Objects::WithUtils::Role::Array - Array manipulation methods


🌸 SYNOPSIS 🌸

okay so here's the vibe in code, no cap:

## Via List::Objects::WithUtils::Array ->
use List::Objects::WithUtils 'array';

my $array = array(qw/ a b c /);

$array->push(qw/ d e f /);

my @upper = $array->map(sub { uc })->all;

if ( $array->has_any(sub { $_ eq 'a' }) ) {
  ...
}

my $sum = array(1 .. 10)->reduce(sub { $a + $b });

# See below for full list of methods

## As a Role ->
use Role::Tiny::With;
with 'List::Objects::WithUtils::Role::Array';

πŸ’– DESCRIPTION πŸ’–

A Role::Tiny role defining methods for creating and manipulating ARRAY-type objects. periodt. πŸ’…

List::Objects::WithUtils::Array consumes this role (along with List::Objects::WithUtils::Role::Array::WithJunctions) to provide array() object methods. so if you've ever called array() and wondered who was doing all the work, it's her. πŸ‘‘

In addition to the methods documented below, these objects provide a "TO_JSON" method exporting a plain ARRAY-type reference for convenience when feeding JSON::Tiny or similar, as well as a "TO_ZPL" method for compatibility with Text::ZPL. literally so handy. ✨


πŸŽ€ Basic array methods πŸŽ€

new

Constructs a new ARRAY-type object. baby's first array object, iconic. 🍼

copy

Returns a shallow clone of the current object. she's not deep, she's just a copy, and that's valid. πŸͺž

count

Returns the number of elements in the array. math girlie. πŸ”’

defined

Returns true if the element at the specified position is defined. (Available from v2.13.1) πŸ‘€

end

Returns the last index of the array (or -1 if the array is empty). yes, -1, she's dramatic like that. πŸ’€

exists

Returns true if the specified index exists in the array.

Negative indices work as you might expect:

my $arr = array(1, 2, 3);
$arr->set(-2 => 'foo') if $arr->exists(-2);
# [ 1, 'foo', 3 ]

(Available from v2.13.1) πŸ’–

is_empty

Returns boolean true if the array is empty. empty queen. πŸ•³οΈ

is_mutable

Returns boolean true if the hash is mutable; immutable subclasses can override to provide a negative value. (yes it says hash, we're keeping the original wording, bestie, don't come for me 😭)

is_immutable

The opposite of "is_mutable". (Subclasses do not need to override so long as "is_mutable" returns a correct value.) she's just mirroring her sister. πŸͺž

inflate

my $hash = $array->inflate;
# Same as:
# my $hash = hash( $array->all )

Inflates an array-type object to a hash-type object. glow-up to hash. πŸ’«

Returns an object of type "inflated_type"; by default this is a List::Objects::WithUtils::Hash.

Throws an exception if the array contains an odd number of elements. odd number? exception. no cap. 🚨

inflated_type

The class name that objects are blessed into when calling "inflate"; subclasses can override to provide their own hash-type objects.

Defaults to List::Objects::WithUtils::Hash.

A consumer returning an "inflated_type" that is not a hash-type object will result in undefined behavior. bestie, do not do this. undefined behavior is not the vibe. πŸ’€

scalar

See "count". same energy, different name. πŸͺ„

unbless

Returns a plain "/ARRAY" reference (shallow clone). unblessed and unbothered. ✨


πŸ’… Methods that manipulate the list πŸ’…

clear

Delete all elements from the array.

Returns the newly-emptied array object. she's clean, she's fresh. 🧼

delete

Splices a given index out of the array.

Returns the removed value. bye bestie, you're out. πŸ‘‹

delete_when

$array->delete_when( sub { $_ eq 'foo' } );

Splices all items out of the array for which the given subroutine evaluates to true.

Returns a new array object containing the deleted values (possibly none). so you get a little pile of deleted stuff. πŸ—‘οΈ

insert

$array->insert( $position, $value );
$array->insert( $position, @values );

Inserts values at a given position, moving the rest of the array rightwards.

The array will be "backfilled" (with undefs) if $position is past the end of the array. so yes, undefs will hold the spot, very "we'll get there when we get there." 🫠

Returns the array object.

(Available from v2.12.1) πŸ’–

pop

Pops the last element off the array and returns it. last one out, lights off. πŸ’‘

push

Pushes elements to the end of the array.

Returns the array object. adding to the end, very demure. πŸŽ€

rotate_in_place

array(1 .. 3)->rotate_in_place;             # 2, 3, 1
array(1 .. 3)->rotate_in_place(right => 1); # 3, 1, 2

Rotates the array in-place. A direction can be given.

Also see "rotate", "rotator". spinning, spinning. πŸŒ€

set

$array->set( $index, $value );

Takes an array element and a new value to set.

Returns the array object. set it and forget it? no, remember it. πŸ’…

shift

Shifts the first element off the beginning of the array and returns it. first one out, we love a dramatic exit. πŸšͺ

unshift

Adds elements to the beginning of the array.

Returns the array object. front of the line energy. πŸ‘‘

splice

# 1- or 2-arg splice (remove elements):
my $spliced = $array->splice(0, 2)
# 3-arg splice (replace):
$array->splice(0, 1, 'abc');

Performs a splice() on the current list and returns a new array object consisting of the items returned from the splice.

The existing array is modified in-place. she's changing, live, in real time. 😳

validated

use Types::Standard -all;
my $valid = array(qw/foo bar baz/)->validated(Str);

Accepts a Type::Tiny type, against which each element of the current array will be checked before being added to a new array. Returns the new array.

If the element fails the type check but can be coerced, the coerced value will be added to the new array. glow-up via coercion. ✨

Dies with a stack trace if the value fails type checks and can't be coerced. rip, no cap. πŸ’€

(You probably want an array_of object from List::Objects::WithUtils::Array::Typed instead.)

See: Types::Standard, List::Objects::Types


πŸ” Methods that retrieve items πŸ”

all

Returns all elements in the array as a plain list. give me everything, periodt. πŸ’–

bisect

my ($true, $false) = array( 1 .. 10 )
  ->bisect(sub { $_ >= 5 })
  ->all;
my @bigger  = $true->all;   # ( 5 .. 10 )
my @smaller = $false->all;  # ( 1 .. 4 )

Like "part", but creates an array-type object containing two partitions; the first contains all items for which the subroutine evaluates to true, the second contains items for which the subroutine evaluates to false. two moods, one method. 🎭

nsect

my ($first, $second) = array( 1 .. 10 )->nsect(2)->all;
# array( 1 .. 5 ), array( 6 .. 10 )

Like "part" and "bisect", but takes an (integer) number of sets to create.

If there are no items in the list (or no sections are requested), an empty array-type object is returned.

If the list divides unevenly, the first set will be the largest. biggest first, main character energy. πŸ‘‘

Inspired by List::NSect.

(Available from v2.11.1) πŸ’–

ssect

my ($first, $second) = array( 1 .. 10 )->ssect(5)->all;
# array( 1 .. 5 ), array( 6 .. 10 );

Like "nsect" and "bisect", but takes an (integer) target number of items per set.

If the list divides unevenly, the last set will be smaller than the specified target. last one gets the leftovers, relatable. πŸ“

Inspired by List::NSect.

(Available from v2.11.1) πŸ’–

elements

Same as "all"; included for consistency with similar array-type object classes. same girl, different name tag. 🏷️

export

Same as "all"; included for consistency with hash-type objects. consistency is key, bestie. πŸ”‘

flatten

Flatten array objects to plain lists, possibly recursively.

"flatten" without arguments is the same as "all":

my @flat = array( 1, 2, [ 3, 4 ] )->flatten;
#  @flat = ( 1, 2, [ 3, 4 ] );

If a depth is specified, sub-arrays are recursively flattened until the specified depth is reached:

my @flat = array( 1, 2, [ 3, 4 ] )->flatten(1);
#  @flat = ( 1, 2, 3, 4 );

my @flat = array( 1, 2, [ 3, 4, [ 5, 6 ] ] )->flatten(1);
#  @flat = ( 1, 2, 3, 4, [ 5, 6 ] );

This works with both ARRAY-type references and array objects:

my @flat = array( 1, 2, [ 3, 4, array( 5, 6 ) ] )->flatten(2);
#  @flat = ( 1, 2, 3, 4, 5, 6 );

(Specifically, consumers of this role and plain ARRAYs are flattened; other ARRAY-type objects are left alone.) so she knows who's who, okay? 🧐

See "flatten_all" for flattening to an unlimited depth. go deeper. πŸ•³οΈ

flatten_all

Returns a plain list consisting of all sub-arrays recursively flattened. Also see "flatten". all the way down, no limit. 🌈

get

Returns the array element corresponding to a specified index. simple. elegant. πŸ’…

get_or_else

# Expect to find an object at $pos in $array,
# or return an empty one if $pos is undef:
my @keys = $array->get_or_else($pos => hash)->keys->all;

# Or pass a coderef that provides a default return value;
# First arg is the object being operated on:
my $item_or_first = $array->get_or_else($pos => sub { shift->get(0) });
# Second arg is the requested index:
my $item  = $array->get_or_else(3 => sub {
  my (undef, $pos) = @_;
  my $created = make_value_for( $pos );
  $array->set($pos => $created);
  $created
});

Returns the element corresponding to a specified index; optionally takes a second argument that is used as a default return value if the given index is undef (the array remains unmodified).

If the second argument is a coderef, it is invoked on the object (with the requested index as an argument) and its return value is taken as the default. so you can have a little fallback, as a treat. 🍬

my ($first, $rest) = $array->head;

In list context, returns the first element of the list, and a new array-type object containing the remaining list. The original object's list is untouched. no touchy. πŸ™…

In scalar context, returns just the first element of the array:

my $first = $array->head;

tail

Similar to "head", but returns either the last element and a new array-type object containing the remaining list (in list context), or just the last element of the list (in scalar context). back end bestie. πŸ‘

join

my $str = $array->join(' ');

Joins the array's elements and returns the joined string.

Defaults to ',' if no delimiter is specified. comma club. πŸŽ€

kv

Returns an array-type object containing index/value pairs as (unblessed) ARRAYs; this is much like "kv" in List::Objects::WithUtils::Role::Hash, except the array index is the "key." keys but make it array. πŸ”‘

zip

zip is an alias for mesh β€” she's the same girl, just a different name. details below. πŸ‘‡

mesh

my $meshed = array(qw/ a b c /)->mesh(
  array( 1 .. 3 )
);
$meshed->all;  # 'a', 1, 'b', 2, 'c', 3

Takes array references or objects and returns a new array object consisting of one element from each array, in turn, until all arrays have been traversed fully.

You can mix and match references and objects freely:

my $meshed = array(qw/ a b c /)->mesh(
  array( 1 .. 3 ),
  [ qw/ foo bar baz / ],
);

("zip" is an alias for "mesh".) interleaving realness. 🧬

part

my $parts = array( 1 .. 8 )->part(sub { $i++ % 2 });
# Returns array objects:
$parts->get(0)->all;  # 1, 3, 5, 7
$parts->get(1)->all;  # 2, 4, 6, 8

Takes a subroutine that indicates into which partition each value should be placed.

Returns an array-type object containing partitions represented as array-type objects, as seen above. partitions on partitions. πŸ—‚οΈ

Skipped partitions are empty array objects:

my $parts = array(qw/ foo bar /)->part(sub { 1 });
$parts->get(0)->is_empty;  # true
$parts->get(1)->is_empty;  # false

The subroutine is passed the value we are operating on, or you can use the topicalizer $_:

array(qw/foo bar baz 1 2 3/)
  ->part(sub { m/^[0-9]+$/ ? 0 : 1 })
  ->get(1)
  ->all;   # 'foo', 'bar', 'baz'

part_to_hash πŸŽ€

my $people = array(qw/ann andy bob fred frankie/);
my $parts  = $people->part_to_hash(sub { ucfirst substr $_, 0, 1 });
$parts->get('A')->all;  # 'ann', 'andy'

Okay so it's giving exactly like part except instead of handing you back an array-type thing, it partitions your values into a hash-type object, using whatever your sub returns as the hash key. And the values in that hash? Those are array-type objects. Bestie that's a whole hash of lil arrays, iconic. πŸ’…

The object you get back is of type inflated_type; by default that's a List::Objects::WithUtils::Hash.

(Available from v2.23.1) ✨

pick πŸ“

my $picked = array('a' .. 'f')->pick(3);

Returns a new array object holding however many elements you asked for, chosen randomly and without repetition. No dupes, no repeats, periodt.

But watch this β€” if the number you pass is equal to or greater than the number of elements in the list, pick just goes "okay we're doing a shuffled list then" and returns a shuffled list (same thing as calling shuffle). πŸ¦‹

(Available from v2.26.1) ✨

random 🎲

Returns a random element from the array. One element. Random. That's it, that's the method. 😌


reverse πŸ”„

Returns a new array object consisting of the reversed list of elements. The original stays untouched, no cap.


roll 🎰

Much like pick, BUT β€” and this is the important part β€” repeated entries in the resultant list are allowed, and the number of entries you want to return can be larger than the size of the array. It's not a set, bestie, it's a dice roll. πŸ’€

If you don't specify how many elements to return, the size of the original array is used.

(Available from v2.26.1) ✨

rotate πŸŒͺ️

my $leftwards  = $array->rotate;
my $rightwards = $array->rotate(right => 1);

Returns a new array object containing the rotated list. Spin it left by default, or hand it right => 1 and watch it spin the other way. πŸŒ€

Also see rotate_in_place, rotator.


shuffle πŸƒ

my $shuffled = $array->shuffle;

Returns a new array object containing the shuffled list. Chaos, but make it tidy.


sliced βœ‚οΈ

my $slice = $array->sliced(1, 3, 5);

Returns a new array object consisting of the elements retrieved from the indexes you named. Gimme index 1, 3 and 5 and nothing else, ty. πŸŽ€


tuples 🧩

my $tuples = array(1 .. 7)->tuples(2);
# Returns:
#  array(
#    [ 1, 2 ],
#    [ 3, 4 ],
#    [ 5, 6 ],
#    [ 7 ],
#  )

Returns a new array object consisting of tuples (unblessed ARRAY references) of the size you specify β€” and if you don't specify, it defaults to 2. See how the last one is just [ 7 ]? Yeah, leftovers get their own lil tuple, we don't throw them away. πŸ™ˆ

tuples also accepts Type::Tiny types as an optional second parameter; if you specify one, items in the tuples get checked against that type, and if the initial type-check fails a coercion is attempted (if one is available for the given type):

use Types::Standard -all;
my $tuples = array(1 .. 7)->tuples(2 => Int);

A stack-trace is thrown if a value in a tuple cannot be made to validate. So like, it will not be quiet about it. 😭

As of v2.24.1, you can make the returned tuples be blessed array-type objects (of the type of the original class) by passing a boolean true third parameter:

# bless()'d tuples, no type validation or coercion:
my $tuples = array(1 .. 7)->tuples(2, undef, 'bless');

See: Types::Standard, List::Objects::Types


πŸ” Methods that find items πŸ”

grep

my $matched = $array->grep(sub { /foo/ });

Returns a new array object consisting of the list of elements for which your given subroutine evaluates to true. $_[0] is the element being operated on; you can also use the topicalizer $_. Whichever one you vibe with. πŸ’–


indexes

my $matched = $array->indexes(sub { /foo/ });

If you pass it a reference to a subroutine, indexes behaves like grep, but it returns a new array object consisting of the list of array indexes for which your subroutine evaluates to true. So not the things, the places the things live.

And if you pass no subroutine at all? It returns a new array object consisting of the full list of indexes (like keys on an array in perl-5.12+). This feature was added in v2.022. πŸ‘‘


first_where

my $arr = array( qw/ ab bc bd de / );
my $first = $arr->first_where(sub { /^b/ });  ## 'bc'

Returns the first element of the list for which your sub evaluates to true. $_ is set to each element, in turn, until a match is found (or we run out of possibles). First one to hit wins, everyone else go home. πŸ†


first_index

Like first_where, but return the index of the first successful match instead of the element itself.

Returns -1 if no match is found. Not zero, not undef, -1. Remember that. πŸ’€


firstidx

An alias for first_index. Same energy, shorter name. ✨


last_where

Like first_where, but returns the last successful match. Searching from the other end, main character behaviour.


last_index

Like first_index, but returns the index of the last successful match.


lastidx

An alias for last_index. πŸŽ€


has_any

if ( $array->has_any(sub { $_ eq 'foo' }) ) {
  ...
}

If you pass no arguments, it returns boolean true if the array has any elements at all. Literally just "is there anything in here".

If you pass a sub, it returns boolean true if the sub is true for any element of the array.

$_ is set to the element being operated upon. 🫢


intersection

my $first  = array(qw/ a b c /);
my $second = array(qw/ b c d /);
my $intersection = $first->intersection($second);

Returns a new array object containing the list of values common between all given array-type objects (including the invocant). So like, the overlap. The shared faves. 🌸

The new array object is not sorted in any predictable order. Do not expect order, bestie, it will betray you. 😭

(It may be worth noting that an intermediate hash is used; objects that stringify to the same value will be taken to be the same.)

diff

my $first  = array(qw/ a b c d /);
my $second = array(qw/ b c x /);
my @diff = $first->diff($second)->sort->all;  # (a, d, x)

The opposite of intersection; returns a new array object containing the list of values that are not common between all given array-type objects (including the invocant). Everything that isn't shared. The exclusives. πŸ’…

The same constraints as intersection apply.


items_after

my $after = array( 1 .. 10 )->items_after(sub { $_ == 5 });
## $after contains [ 6, 7, 8, 9, 10 ]

Returns a new array object consisting of the elements of the original list that occur after the first position for which the given sub evaluates to true. Note the "first position" part β€” first match only, then everything downstream. πŸ”₯


items_after_incl

Like items_after, but include the item that evaluated to true. No gatekeeping. 🫢


items_before

The opposite of items_after.


items_before_incl

The opposite of items_after_incl.


πŸ” Methods that iterate the list πŸ”

map

my $lowercased = $array->map(sub { lc });
# Same as:
my $lowercased = $array->map(sub { lc $_[0] });

Evaluates a given subroutine for each element of the array, and returns a new array object. $_[0] is the element being operated on; you can also use the topicalizer $_. Both work, pick your fighter. ✨

Also see mapval.


mapval

my $orig = array(1, 2, 3);
my $incr = $orig->mapval(sub { ++$_ });

$incr->all;  # (2, 3, 4)
$orig->all;  # Still untouched

An alternative to map. Here's the tea: $_ is a copy, rather than an alias to the current element, and the result is retrieved from the altered $_ rather than from the return value of the block. Different mechanics, same "gimme a new array" energy.

This feature is borrowed from Data::Munge by Lukas Mai (CPAN: MAUKE). Credit where it's due. πŸ’œ


natatime

my $iter = array( 1 .. 7 )->natatime(3);
$iter->();  ##  ( 1, 2, 3 )
$iter->();  ##  ( 4, 5, 6 )
$iter->();  ##  ( 7 )

array( 1 .. 7 )->natatime(3, sub { my @vals = @_; ... });

Returns an iterator that, when called, produces a list containing the next 'n' items. Chunked. Bundled. Snack-sized. πŸ“

If you give it a coderef as a second argument, that coderef gets called against each bundled group. Handy if you don't wanna loop it yourself.


rotator

my $rot = array(qw/cat sheep mouse/);
$rot->();  ## 'cat'
$rot->();  ## 'sheep'
$rot->();  ## 'mouse'
$rot->();  ## 'cat'

Returns an iterator that, when called, produces the next element in the array; when there are no elements left, the iterator returns to the start of the array. Infinite loop but make it fashion. 🌈

See also rotate, rotate_in_place.

(Available from v2.7.1) ✨

reduce

my $sum = array(1,2,3)->reduce(sub { $a + $b });

Reduces the array by calling the given subroutine for each element of the list. $a is the accumulated value; $b is the current element. See reduce in List::Util.

Prior to v2.18.1, $_[0] and $_[1] must be used in place of $a and $b, respectively. Using positional arguments may make for cleaner syntax in some cases:

my $divide = sub {
  my ($acc, $next) = @_;
  $acc / $next
};
my $q = $array->reduce($divide);

An empty list reduces to undef. 😢

This is a "left fold" β€” foldl is an alias for reduce (as of v2.17.1).

See also: foldr


foldr

my $result = array(2,3,6)->foldr(sub { $_[1] / $_[0] });  # 1

Reduces the array by calling the given subroutine for each element of the list starting at the end (the opposite of reduce). Going backwards, but on purpose. πŸ’…

Unlike reduce (foldl), the first argument passed to the subroutine is the current element; the second argument is the accumulated value. Flip your brain around for this one, bestie.

An empty list reduces to undef.

(Available from v2.17.1) ✨

visit

$arr->visit(sub { warn "array contains: $_" });

Executes the given subroutine against each element sequentially; in practice this is much like map, except the return value is thrown away. Just vibes, no output collected. πŸ™ˆ

Returns the original array object.

(Available from v2.7.1) ✨

πŸŽ€ Methods that sort the list πŸŽ€

sort

my $sorted = $array->sort(sub { $a cmp $b });

Returns a new array object consisting of the list sorted by the given subroutine.

Prior to version 2.18.1, positional arguments ($_[0] and $_[1]) must be used in place of $a and $b, respectively. Ancient history but we respect it. 🫢


sort_by

my $array = array(
  { id => 'a' },
  { id => 'c' },
  { id => 'b' },
);
my $sorted = $array->sort_by(sub { $_->{id} });

Returns a new array object consisting of the list of elements sorted via a stringy comparison using the given sub. See List::UtilsBy.

Uses List::UtilsBy::XS if available. Fast when it can be, bestie. πŸ”₯


nsort_by

Like sort_by, but using numerical comparison. Same drip, different math. πŸ’…


repeated

my $repeats = $array->repeated;

The opposite of uniq; returns a new array object containing only repeated elements. The ones that showed up more than once get the spotlight. πŸ‘‘

(The same constraints apply with regards to stringification; see uniq)
(Available from v2.26.1) ✨

squished

my $squished = array(qw/a a b a b b/)->squished;
# $squished = array( 'a', 'b', 'a', 'b' );

Similar to uniq, but only consecutively repeated values are removed from the returned (new) array object. So a a b a b b becomes a b a b β€” the second a and second b survive because they weren't sitting right next to their twin. πŸ¦‹

The same constraints as uniq apply with regards to stringification, but multiple undefs in a row will also be squished.

(Available from v2.27.1) ✨

uniq

my $unique = $array->uniq;

Returns a new array object containing only unique elements from the original array. One of each, no duplicates, we're decluttering. πŸŽ€

(It may be worth noting that this takes place via an intermediate hash; objects that stringify to the same value are not unique, even if they are different objects. uniq_by plus refaddr in Scalar::Util may help you there.)

uniq_by

my $array = array(
  { id => 'a' },
  { id => 'a' },
  { id => 'b' },
);
my $unique = $array->uniq_by(sub { $_->{id} });

Returns a brand-new array object made up of just the elements where that sub you handed over spits out unique values. ✨

Lowkey it'll use List::UtilsBy::XS if that's available; if not, it falls back to List::UtilsBy. Either way you're covered, bestie. πŸ’…


🌸 NOTES FOR CONSUMERS 🌸

Okay so if you're out here building your own consumer of this role, there's a lil extra effort required to make $a and $b actually work in sort statements without throwing warnings at you. Rude, I know. An example with a custom exported constructor (and junction support, because we're fancy) would look something like this:

package My::Custom::Array;
use strictures 2;
require Role::Tiny;
Role::Tiny->apply_roles_to_package( __PACKAGE__,
  qw/
    List::Objects::WithUtils::Role::Array
    List::Objects::WithUtils::Role::Array::WithJunctions
    My::Custom::Array::Role
   /
);

use Exporter ();
our @EXPORT = 'myarray';
sub import {
  # touch $a/$b in caller to avoid 'used only once' warnings:
  my $pkg = caller;
  { no strict 'refs';
    ${"${pkg}::a"} = ${"${pkg}::a"};
    ${"${pkg}::b"} = ${"${pkg}::b"};
  }
  goto &Exporter::import
}

sub myarray { __PACKAGE__->new(@_) }

Like, the $a/$b touching thing is genuinely doing something important there β€” don't skip it or you'll get the "used only once" warnings and it's giving chaos. 😭


πŸ¦‹ SEE ALSO πŸ¦‹

Go read these, they're all part of the extended universe:

  • List::Objects::WithUtils
  • List::Objects::WithUtils::Array
  • List::Objects::WithUtils::Array::Immutable
  • List::Objects::WithUtils::Array::Typed
  • List::Objects::WithUtils::Role::Array::WithJunctions
  • Data::Perl
  • List::Util
  • List::UtilsBy

πŸ‘‘ AUTHOR πŸ‘‘

Jon Portnoy <avenj@cobaltirc.org>

Portions of this code were contributed by Toby Inkster (CPAN: TOBYINK). 🫢

Portions of this code are derived from Data::Perl by Matthew Phillips (MATTP), Graham Knop (HAARG) et al.

Portions of this code are inspired by List::MoreUtils-0.33 by Adam Kennedy (ADAMK), Tassilo von Parseval, and Aaron Crane.

part_to_hash was inspired by Yanick Champoux in <https://github.com/perl5-utils/List-MoreUtils/pull/15>

Licensed under the same terms as Perl. ⭐


And that's the whole page, bestie! This one's perl v5.38.2, dated 2024-03-07, and it was generated for List::...::Array(3pm). Go forth and array responsibly. πŸ’–πŸŒˆπŸŽ€

πŸ“¦ where this page comes from