Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
show list assignment to shaped arrays
  • Loading branch information
gfldex committed Jul 14, 2016
1 parent c882c8d commit 4fe536e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doc/Language/list.pod6
Expand Up @@ -429,6 +429,14 @@ the C<shape> method.
say @a.shape;
# OUTPUT«(2 2)␤»
Assignment to a fixed size Array will promote a List of Lists to an Array of
Arrays.
my @a[2;2] = (1,2; 3,4);
@a[1;1] = 42;
dd @a;
# OUTPUT«Array.new(:shape(2, 2), [1, 2], [3, 42])␤»
=head2 Itemization
For most uses, Arrays consist of a number of slots each containing a C<Scalar> of
Expand Down

0 comments on commit 4fe536e

Please sign in to comment.