Skip to content

Commit ad7558e

Browse files
committed
Redirecting anchors and clarifying terms
Closes #3755, closes Raku/old-issue-tracker#6451
1 parent b06f280 commit ad7558e

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

doc/Language/5to6-nutshell.pod6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ of a list, or in passing arguments to a sub that expects a flat list of
626626
C<KEY, VALUE, KEY, VALUE>, then continuing to use C«=>» may break your code.
627627
The easiest workaround is to change that I<fat arrow> to a regular comma, and
628628
manually add quotes to its left-hand side. Or, you can change the sub's API
629-
to L<slurp a hash|/type/Signature#Slurpy_(A.K.A._variadic)_parameters>.
629+
to L<slurp a hash|/type/Signature#Slurpy_parameters>.
630630
A better long-term solution is to change the sub's API to
631631
expect L<Pair|/type/Pair>s; however, this requires you to change
632632
all sub calls at once.

doc/Type/Parameter.pod6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ Defined as:
149149
method slurpy(Parameter:D: --> Bool:D)
150150
151151
Returns C<True> for
152-
L<slurpy parameters|/type/Signature#Slurpy_(A.K.A._variadic)_parameters>.
152+
L<slurpy parameters|/type/Signature#Slurpy_parameters>.
153153
154154
=head2 method twigil
155155
@@ -380,7 +380,7 @@ Defined as:
380380
381381
method prefix(Parameter:D: --> Str:D)
382382
383-
If the parameter is L«slurpy|/type/Signature#Slurpy_(A.K.A._variadic)_parameters»,
383+
If the parameter is L«slurpy|/type/Signature#Slurpy_variadic)_parameters»,
384384
returns the marker (e.g., C«*», C«**», or C«+») the parameter was declared
385385
with. Otherwise, returns an empty string.
386386

doc/Type/Signature.pod6

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ against undefined values within the C<where> clause.
256256
257257
=head3 Constraining slurpy arguments
258258
259-
L<Slurpy arguments|#Slurpy_(A.K.A._variadic)_parameters> can not have type
259+
L<Slurpy arguments|#Slurpy_parameters> can not have type
260260
constraints. A C<where>-clause in conjunction with a L<Junction|/type/Junction>
261261
can be used to that effect.
262262
@@ -648,11 +648,16 @@ directly apply string methods, such as the number of characters.
648648
X<|parameter,*@>
649649
X<|parameter,*%>
650650
X<|slurpy argument>
651-
=head2 Variadic parameters
651+
=head2 Slurpy parameters
652652
653653
A function is X<variadic> if it can take a varying number of arguments; that is,
654-
its arity is not fixed. Therefore, optional, named, and slurpy parameters
655-
make routines that use them I<variadic>. An array or hash parameter can be
654+
its arity is not fixed. Therefore,
655+
L<optional|https://docs.raku.org/type/Signature#index-entry-optional_argument>,
656+
named, and slurpy parameters
657+
make routines that use them I<variadic>, and by extension are called variadic
658+
arguments. Here we will focus on slurpy parameters, or simply I<slurpies>.
659+
660+
An array or hash parameter can be
656661
marked as I<slurpy> by leading single (*) or double asterisk (**) or a
657662
leading plus (+). A slurpy parameter can bind to an arbitrary number of
658663
arguments (zero or more), and it will result in a type that is compatible
@@ -695,7 +700,8 @@ say combined-slurpy(one => 1, two => 2, 3, 4, five => 5, 6);
695700
# OUTPUT: «{array => [3 4 6], hash => {five => 5, one => 1, two => 2}}␤»
696701
=end code
697702
698-
Note that positional parameters aren't allowed after slurpy parameters:
703+
Note that positional parameters aren't allowed after slurpy (or, in
704+
fact, after any type of variadic) parameters:
699705
700706
=begin code :skip-test<compile time error>
701707
:(*@args, $last);

0 commit comments

Comments
 (0)