@@ -687,18 +687,17 @@ Returns the length of the array counted in elements.
687
687
688
688
=item delete
689
689
690
- method delete (@array : *@indices --> List ) is export
690
+ method delete (@array : Int $index --> $value ) is export
691
691
692
- Sets elements specified by C<@indices> in the invocant to a
693
- non-existent state, as if they never had a value. Deleted elements at
694
- the end of an Array shorten the length of the Array, unless doing so
695
- would violate an C<is shape()> definition.
692
+ Sets the specified Array element to the default value of the Array.
696
693
697
- This is considered to be an internal method. The interpretation of C<@indices>
698
- is therefor subject to change. The normal way to delete is by applying a
699
- C<:delete> adverb to any subscripting operation.
694
+ Deleted elements at the end of an Array shorten the length of the Array,
695
+ unless doing so would violate an C<is shape()> definition.
700
696
701
- Returns the value(s) previously held in deleted locations.
697
+ This is considered to be an internal method. The normal way to delete is by
698
+ applying a C<:delete> adverb to any subscripting operation.
699
+
700
+ Returns the value previously held in deleted location.
702
701
703
702
=item :delete
704
703
@@ -709,8 +708,8 @@ returns the elements normally, but reads them out destructively.
709
708
710
709
method exists (@array: Int $index --> Bool )
711
710
712
- True if the specified Array element has been assigned to. This
713
- is not the same as being defined .
711
+ True if the specified Array element has been assigned to with a value different
712
+ from the default value of the Array .
714
713
715
714
Supplying a different number of indices than invocant has dimensions is
716
715
an error.
0 commit comments