Skip to content

Commit 97bee31

Browse files
committed
correct fossil use of proto to mean default
You can define your own [+], but not using proto.
1 parent 4fe1480 commit 97bee31

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

S03-operators.pod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Synopsis 3: Perl 6 Operators
1515

1616
Created: 8 Mar 2004
1717

18-
Last Modified: 31 Jan 2012
19-
Version: 237
18+
Last Modified: 6 Feb 2012
19+
Version: 238
2020

2121
=head1 Overview
2222

@@ -4428,7 +4428,7 @@ a reduction operator really is a list prefix, and is invoked as one.
44284428
Hence, you can implement a reduction operator in one of two ways. Either
44294429
you can write an explicit list operator:
44304430

4431-
proto prefix:<[+]> (*@args) {
4431+
multi prefix:<[+]> (*@args) is default {
44324432
my $accum = 0;
44334433
while (@args) {
44344434
$accum += @args.shift();
@@ -4462,8 +4462,8 @@ together, just as if you had written it out explicitly:
44624462

44634463
If fewer than two arguments are given, a dispatch is still attempted
44644464
with whatever arguments are given, and it is up to the receiver of that
4465-
dispatch to deal with fewer than two arguments. Note that the proto
4466-
list operator definition is the most general, so you are allowed to define
4465+
dispatch to deal with fewer than two arguments. Note that the default
4466+
list operator signature is the most general, so you are allowed to define
44674467
different ways to handle the one argument case depending on type:
44684468

44694469
multi prefix:<[foo]> (Int $x) { 42 }

0 commit comments

Comments
 (0)