8
8
9
9
The value C < Nil > may be used to fill a spot where a value would normally
10
10
go, and in so doing, explicitly indicate that no value is present. It
11
- may also used as a cheaper and less explosive alternative to a
11
+ may also be used as a cheaper and less explosive alternative to a
12
12
L < C < Failure > |/type/Failure> . (In fact, class C < Failure > is derived from C < Nil > ,
13
13
so smartmatching C < Nil > will also match C < Failure > .)
14
14
@@ -24,7 +24,7 @@ is considered undefined for all other purposes.
24
24
sub a( --> Int:D ) { return Nil }
25
25
a().say; # Nil
26
26
27
- C < Nil > is what is returned from empty routines or clauses , or routines
27
+ C < Nil > is what is returned from empty routines or closure , or routines
28
28
that use a bare C < return > statement.
29
29
30
30
sub a { }; a().say; # Nil
@@ -52,7 +52,7 @@ C<Nil>.
52
52
53
53
When assigned to a container, the C < Nil > value (but not any subclass of
54
54
C < Nil > ) will attempt to revert the container to its default value; if no
55
- such default is declared, Perl 6 assumes C < Any > . However, if the container's
55
+ such default is declared, Perl 6 assumes C < Any > . However, if the container
56
56
type is constrained with C < :D > , assigning C < Nil > to it will immediately throw
57
57
an exception. (In contrast, an instantiated C < Failure > matches C < :D >
58
58
because it's a definite value, but will fail to match the actual nominal
0 commit comments