Skip to content

Commit 68872b2

Browse files
committed
Show typed array of syntax
1 parent 0c971d3 commit 68872b2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doc/Language/list.pod6

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,8 @@ change its type by specifying the type of the elements when declaring it:
523523
524524
=begin code
525525
my Int @a = 1, 2, 3; # An Array that contains only Ints
526+
# the same as
527+
my @a of Int = 1, 2, 3; # An Array of Ints
526528
my @b := Array[Int].new(1, 2, 3); # Same thing, but the variable is not typed
527529
my @b := Array[Int](1, 2, 3); # Rakudo shortcut for the same code
528530
say @b eqv @a; # says True.

0 commit comments

Comments
 (0)