1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-28 09:01:39 +02:00

[perl6] Lists are not Arrays. Make this clear

Lists are immutable while Arrays are mutable. Arrays are
which have the @ sigil.
This commit is contained in:
Samantha McVey
2017-07-10 21:40:05 -07:00
parent ade91a6fd9
commit df6f8630a3

View File

@@ -54,10 +54,11 @@ my $forced-bool = so $str; # And you can use the prefix `so` operator
# which turns its operand into a Bool
```
### Lists
### Arrays and Lists
```perl6
# Lists represent multiple values. Their name start with `@`.
# Arrays represent multiple values. Their name start with `@`.
# Lists are similar but are an immutable type
my @array = 'a', 'b', 'c';
# equivalent to :