Skip to content

Commit 9582910

Browse files
committed
doc binding to Nil and test against Nil
1 parent a281cb8 commit 9582910

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

doc/Type/Nil.pod

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ assigning C<Nil> to a variable which has a default will restore that default.
4545
for $x,$y -> $val is rw { $val = $reset unless $val > 0 }
4646
$x.say; #-> 42
4747
48+
To make C<Nil> stick to a container use binding. To test against C<Nil> use
49+
C<===> and C<any>.
50+
51+
my @c := 1,Nil,2;
52+
dd @c; # (1, Nil, 2)
53+
say so Nil === any(@c); # True
54+
4855
=head1 Methods
4956
5057
=head2 method gist

0 commit comments

Comments
 (0)