<commit_before>=begin pod

=TITLE class Array

=SUBTITLE Sequence of itemized values

    class Array is List { ... }

An C<Array> is a L<List> which forces all its elements to be
scalar containers, which means you can assign to array elements.

=head1 Methods

=head2 routine pop

Defined as:

    multi sub    pop(Array:D )
    multi method pop(Array:D:)

Usage:

    pop ARRAY
    ARRAY.pop

Removes and returns the last item from the array. Fails for an empty array.

Example:

    > my @foo = <a b>;
    a b
    > @foo.pop;
    b
    > pop @foo
    a
    > pop @foo
    Element popped from empty list

=head2 routine push

Defined as:

    multi sub    push(Array:D, **@values) returns Array:D
    multi method push(Array:D: **@values) returns Array:D

Usage:

    push ARRAY, VALUES
    ARRAY.push(VALUES)
    ARRAY.push: VALUES

Adds the C<@values> to the end of the array, and returns the modified list.
Fails for infinite arrays.

Example:

    my @foo = <a b c>;
    @foo.push: 'd';
    say @foo;                   # a b c d

Note that C<push> does not attempt to flatten its argument list. If you pass
an array or list as the thing to push, it becomes one additional element:

    my @a = <a b c>;
    my @b = <d e f>;
    @a.push: @b;
    say @a.elems;               # 4
    say @a[3].join;             # def

Only if you supply multiple values as separate arguments to C<push> are
multiple values added to the array:

   my @a = '1';
   my @b = <a b>
   my @c = <E F>;
   @a.push: @b, @c;
   say @a.elems;                # 3

See L<method append|#method append> for when you want to append multiple
values that are stored in a single array.

=head2 method append

Defined as

    sub append(\array, elems)
    multi method append(Array:D: \values)
    multi method append(Array:D: **@values is raw)
<commit_msg>Added missing semicolon<commit_after>=begin pod

=TITLE class Array

=SUBTITLE Sequence of itemized values

    class Array is List { ... }

An C<Array> is a L<List> which forces all its elements to be
scalar containers, which means you can assign to array elements.

=head1 Methods

=head2 routine pop

Defined as:

    multi sub    pop(Array:D )
    multi method pop(Array:D:)

Usage:

    pop ARRAY
    ARRAY.pop

Removes and returns the last item from the array. Fails for an empty array.

Example:

    > my @foo = <a b>;
    a b
    > @foo.pop;
    b
    > pop @foo
    a
    > pop @foo
    Element popped from empty list

=head2 routine push

Defined as:

    multi sub    push(Array:D, **@values) returns Array:D
    multi method push(Array:D: **@values) returns Array:D

Usage:

    push ARRAY, VALUES
    ARRAY.push(VALUES)
    ARRAY.push: VALUES

Adds the C<@values> to the end of the array, and returns the modified list.
Fails for infinite arrays.

Example:

    my @foo = <a b c>;
    @foo.push: 'd';
    say @foo;                   # a b c d

Note that C<push> does not attempt to flatten its argument list. If you pass
an array or list as the thing to push, it becomes one additional element:

    my @a = <a b c>;
    my @b = <d e f>;
    @a.push: @b;
    say @a.elems;               # 4
    say @a[3].join;             # def

Only if you supply multiple values as separate arguments to C<push> are
multiple values added to the array:

   my @a = '1';
   my @b = <a b>;
   my @c = <E F>;
   @a.push: @b, @c;
   say @a.elems;                # 3

See L<method append|#method append> for when you want to append multiple
values that are stored in a single array.

=head2 method append

Defined as

    sub append(\array, elems)
    multi method append(Array:D: \values)
    multi method append(Array:D: **@values is raw)

{'fraction_non_alphanumeric': 0.09428805684613283, 'fraction_numerical': 0.004372779447936594, 'mean_word_length': 2.4691943127962084, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1023849', 'n_tokens_mistral': 1243, 'n_tokens_neox': 1194, 'n_words': 522}