Skip to content

Commit 2cf9b86

Browse files
committed
we should list () as a way to create List, also show ~~ against ()
1 parent 35b4489 commit 2cf9b86

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

doc/Type/List.pod6

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,15 @@ Slurpy parameters (C<*@a>) flatten non-itemized sublists:
6464
say fe(<a b>, <d e>); # 4
6565
say fe(<a b>, <d e>.item); # 3
6666
67+
The emtpy list is created with C<()>. Smartmatching against the empty list will
68+
check for the absense of elements.
69+
70+
my @a;
71+
for @a, @a.list, @a.Seq -> \listoid {
72+
say listoid ~~ ()
73+
}
74+
# OUTPUT«True␤True␤True␤»
75+
6776
=head1 Methods
6877
6978
=head2 routine elems

0 commit comments

Comments
 (0)