Skip to content

Commit b385a5d

Browse files
committed
Remove some spurious "#->"s and sync a couple comments to say output
1 parent 81f6147 commit b385a5d

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

doc/Language/control.pod

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ All the same rules for semicolons and newlines apply, consistently
214214
215215
if 0 { say "no" }
216216
elsif False { say "NO" }
217-
else { say "yes" } ; # -> says "yes"
217+
else { say "yes" } ; # says "yes"
218218
219219
The whole thing either L<slips|/type/Slip> us an empty list (if no blocks
220220
were run) or returns the value produced by the block that did run:
@@ -242,20 +242,20 @@ the sense of a conditional statement. You cannot use C<else> or C<elsif>
242242
with C<unless> because that ends up getting confusing. Other than those
243243
two differences C<unless> works the same as L<if>:
244244
245-
unless 1 { "1 is false".say } ; #-> does not say anything, since 1 is true
246-
unless 1 "1 is false".say ; #-> syntax error, missing block
247-
unless 0 { "0 is false".say } ; #-> says "0 is false"
245+
unless 1 { "1 is false".say } ; # does not say anything, since 1 is true
246+
unless 1 "1 is false".say ; # syntax error, missing block
247+
unless 0 { "0 is false".say } ; # says "0 is false"
248248
249-
unless 42.say and 1 { 43.say } ; #-> says "42" but does not say "43"
250-
43.say unless 42.say and 0; #-> says "42" and then says "43"
251-
43.say unless 42.say and 1; #-> says "42" but does not say "43"
249+
unless 42.say and 1 { 43.say } ; # says "42" but does not say "43"
250+
43.say unless 42.say and 0; # says "42" and then says "43"
251+
43.say unless 42.say and 1; # says "42" but does not say "43"
252252
253-
$_ = 1; unless 0 { $_.say } ; # -> says "1"
254-
$_ = 1; unless 0 -> $_ { $_.say } ; # -> says "0"
255-
$_ = 1; unless False -> $a { $a.say } ; # -> says "False"
253+
$_ = 1; unless 0 { $_.say } ; # says "1"
254+
$_ = 1; unless 0 -> $_ { $_.say } ; # says "0"
255+
$_ = 1; unless False -> $a { $a.say } ; # says "False"
256256
257-
my $c = 0; say (1, (unless 0 { $c += 42; 2; }), 3, $c); #-> says "1 2 3 42"
258-
my $c = 0; say (1, (unless 1 { $c += 42; 2; }), 3, $c); #-> says "1 3 0"
257+
my $c = 0; say (1, (unless 0 { $c += 42; 2; }), 3, $c); # says "(1 2 3 42)"
258+
my $c = 0; say (1, (unless 1 { $c += 42; 2; }), 3, $c); # says "(1 3 0)"
259259
260260
=head3 X<with, orwith, without|control flow,with orwith without>
261261

0 commit comments

Comments
 (0)