Skip to content

Commit 651d20b

Browse files
committed
Rephrase sentence and add small example
1 parent 89bc20d commit 651d20b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

doc/Language/functions.pod6

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,15 @@ one to skip commas between named arguments.
177177
=head2 Return values
178178
179179
Any C<Block> or C<Routine> will provide the value of its last expression as a return value
180-
to the caller. If L<return|/language/control#return> or
181-
L<return-rw|/language/control#return-rw> are called their parameter, if any,
180+
to the caller. If either L<return|/language/control#return> or
181+
L<return-rw|/language/control#return-rw> is called, then its parameter, if any,
182182
will become the return value. The default return value is L<Nil|/type/Nil>.
183183
184184
sub a { 42 };
185185
sub b { say a };
186-
b;
187-
# OUTPUT: «42␤»
186+
sub c { };
187+
b; # OUTPUT: «42␤»
188+
say c; # OUTPUT: «Nil␤»
188189
189190
Multiple return values are returned as a list or by creating a
190191
L<Capture|/type/Capture>. Destructuring can be used to untangle multiple return

0 commit comments

Comments
 (0)