mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00: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:
parent
ade91a6fd9
commit
df6f8630a3
@ -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 :
|
||||
|
Loading…
Reference in New Issue
Block a user