Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
(Partial) broken link sweep: /type -> /routine.
  • Loading branch information
cfa committed Jan 6, 2019
1 parent 1bf6eac commit c5cec61
Show file tree
Hide file tree
Showing 34 changed files with 105 additions and 105 deletions.
4 changes: 2 additions & 2 deletions doc/Language/5to6-perlfunc.pod6
Expand Up @@ -1949,7 +1949,7 @@ C<"hola!".substr(1, 3)> both return "ola".
=item symlink OLDFILE, NEWFILE
See L<symlink|/type/symlink>.
See L<symlink|/routine/symlink>.
=head2 syscall
Expand Down Expand Up @@ -2060,7 +2060,7 @@ as much as possible.
Works similarly to how it does in Perl 5. The one caveat is that ranges are
specified differently. Instead of using a range "a-z", you would use "a..z",
i.e. with Perl's range operator. In Perl 6, C<tr///> has a method version,
called L<trans|/type/trans>, which offers a few additional features.
called L<trans|/routine/trans>, which offers a few additional features.
Perl 5's C</r> flag is instead implemented as C<TR///> operator.
The C<y///> equivalent does not exist.
Expand Down
4 changes: 2 additions & 2 deletions doc/Language/5to6-perlvar.pod6
Expand Up @@ -478,7 +478,7 @@ Currently no obvious equivalent.
No direct replacement exists.
When iterating using L<lines|/type/lines> method from L<IO::Path> or L<IO::Handle> types,
When iterating using L<lines|/routine/lines> method from L<IO::Path> or L<IO::Handle> types,
you can call the C<.kv> method on it to get an interleaved list of indexes and values (then iterate by 2 each loop):
=begin code
Expand Down Expand Up @@ -523,7 +523,7 @@ C<$*OUT.nl-out>.
=item $|
No global alternative available. TTY handles are unbuffered by default, for
others, set L<out-buffer> to zero or use C<:!out-buffer> with L<open|/type/open> on a
others, set L<out-buffer> to zero or use C<:!out-buffer> with L<open|/routine/open> on a
specific L<IO::Handle>.
=item ${^LAST_FH}
Expand Down
2 changes: 1 addition & 1 deletion doc/Language/classtut.pod6
Expand Up @@ -441,7 +441,7 @@ The biggest difference between constructors in Perl 6 and constructors in
languages such as C# and Java is that rather than setting up state on a
somehow already magically created object, Perl 6 constructors
create the object themselves. The easiest way to do this is by calling the
L<bless|/type/bless> method, also inherited from L<Mu|/type/Mu>. The C<bless> method expects a
L<bless|/routine/bless> method, also inherited from L<Mu|/type/Mu>. The C<bless> method expects a
set of named parameters to provide the initial values for each attribute.
The example's constructor turns positional arguments into named arguments,
Expand Down
4 changes: 2 additions & 2 deletions doc/Language/faq.pod6
Expand Up @@ -351,8 +351,8 @@ To test whether a variable has any defined values, see
L<DEFINITE|/language/classtut#index-entry-.DEFINITE> and L<defined|/type/defined>
routines. Several other constructs exist that test for definiteness, such as
L«C<with>, C<orwith>, and C<without>|/syntax/with%20orwith%20without»
statements, L«C<//>|/routine/$SOLIDUS$SOLIDUS», L<andthen|/type/andthen>, L<notandthen|/type/notandthen>, and
L<orelse|/type/orelse> operators, as well as L<type constraint smileys|/type/Signature#Constraining_defined_and_undefined_values>.
statements, L«C<//>|/routine/$SOLIDUS$SOLIDUS», L<andthen|/type/andthen>, L<notandthen|/routine/notandthen>, and
L<orelse|/routine/orelse> operators, as well as L<type constraint smileys|/type/Signature#Constraining_defined_and_undefined_values>.
=head2 What is C<so>?
Expand Down
4 changes: 2 additions & 2 deletions doc/Language/glossary.pod6
Expand Up @@ -344,9 +344,9 @@ is necessary to easily be reminded of what the rarely-used feature does.
For example, printing output is a common task, while performing
thread-safe atomic addition on native atomicity-safe integers is much less so.
There's a need to "huffmanize" the task printing and that's why you can do it by
just typing three letters L<put|/type/put>. But there's no need to "huffmanize" the
just typing three letters L<put|/routine/put>. But there's no need to "huffmanize" the
rarely-needed atomic operators, which is why you type the lengthier
names, such as L<atomic-inc-fetch>. L<put|/type/put> is a bit of a vague name, but because
names, such as L<atomic-inc-fetch>. L<put|/routine/put> is a bit of a vague name, but because
it's commonly used, it's easy to learn what it does. L<atomic-inc-fetch>,
on the other hand is rarer, and the more descriptive name helps recall
its purpose better.
Expand Down
4 changes: 2 additions & 2 deletions doc/Language/grammar_tutorial.pod6
Expand Up @@ -506,12 +506,12 @@ But not really; there's a little more.
If the grammar calls the action above on data, the data method will be called,
but nothing will show up in the big C<TOP> grammar match result returned to our
program. In order to make the action results show up, we need to call L<make|/type/make>
program. In order to make the action results show up, we need to call L<make|/routine/make>
on that result. The result can be many things, including strings, array or
hash structures.
You can imagine that the C<make> places the result in a special contained area
for a grammar. Everything that we C<make> can be accessed later by L<made|/type/made>.
for a grammar. Everything that we C<make> can be accessed later by L<made|/routine/made>.
So instead of the REST-actions class above, we should write:
Expand Down
20 changes: 10 additions & 10 deletions doc/Language/numerics.pod6
Expand Up @@ -28,9 +28,9 @@ The type produced by this division is either a L<Rat|/type/Rat> or a L<Num|/type
L<Rat|/type/Rat> is produced if, after reduction, the fraction's denominator is smaller
than 64 bits, otherwise a L<Num|/type/Num> type is produced.
The L<div|/type/div> and L<narrow|/type/narrow> routines can be helpful if you wish to end
up with an L<Int|/type/Int> result, whenever possible. The L<div|/type/div> operator performs
integer division, discarding the remainder, while L<narrow|/type/narrow> fits the number
The L<div|/routine/div> and L<narrow|/routine/narrow> routines can be helpful if you wish to end
up with an L<Int|/type/Int> result, whenever possible. The L<div|/routine/div> operator performs
integer division, discarding the remainder, while L<narrow|/routine/narrow> fits the number
into the narrowest type it'll fit:
=begin code
Expand Down Expand Up @@ -81,7 +81,7 @@ L<Num|/type/Num> literal and does offer support for negative zero and
L<denormals|https://en.wikipedia.org/wiki/Denormal_number> (also known as
"subnormals").
Keep in mind that output routines like L<say|/type/say> or L<put|/type/put> do not try very hard to
Keep in mind that output routines like L<say|/type/say> or L<put|/routine/put> do not try very hard to
distinguish between how L<Numeric|/type/Numeric> types are output and may choose to display
a L<Num|/type/Num> as an L<Int|/type/Int> or a L<Rat|/type/Rat> number. For a more definitive string to
output, use the L<perl|/type/perl> method:
Expand Down Expand Up @@ -242,7 +242,7 @@ say (1🙼3).perl; # OUTPUT: «FatRat.new(1, 3)␤»
=head2 Printing rationals
Keep in mind that output routines like L<say|/type/say> or L<put|/type/put> do not try very hard to
Keep in mind that output routines like L<say|/type/say> or L<put|/routine/put> do not try very hard to
distinguish between how L<Numeric|/type/Numeric> types are output and may choose to display
a L<Num|/type/Num> as an L<Int|/type/Int> or a L<Rat|/type/Rat> number. For a more definitive string to
output, use the L<perl|/type/perl> method:
Expand All @@ -255,7 +255,7 @@ say ⅓.perl; # OUTPUT: «<1/3>␤»
=end code
For even more information, you may choose to see the L<Rational|/type/Rational> object in
the L<nude|/type/nude>, displaying its B<nu>merator and B<de>nominator:
the L<nude|/routine/nude>, displaying its B<nu>merator and B<de>nominator:
=begin code
say ⅓; # OUTPUT: «0.333333␤»
Expand Down Expand Up @@ -294,8 +294,8 @@ to C<-1>, C<0>, or C<1> depending on whether the original numerator
is negative, zero or positive, respectively.
Operations that can be performed without requiring actual division to occur are
non-explosive. For example, you can separately examine L<numerator|/type/numerator> and
L<denominator|/type/denominator> in the L<nude|/type/nude> or perform mathematical operations without any
non-explosive. For example, you can separately examine L<numerator|/routine/numerator> and
L<denominator|/routine/denominator> in the L<nude|/routine/nude> or perform mathematical operations without any
exceptions or failures popping up.
Converting zero-denominator rationals to L<Num|/type/Num> follows the
Expand Down Expand Up @@ -581,7 +581,7 @@ say $x.abs; # OUTPUT: «42␤»
This behaviour is known as "auto-boxing". The compiler automatically "boxes" the native type
into a full-featured higher-level type with all the methods. In other words, the C<int8> above
was automatically converted to an L<Int|/type/Int> and it's the L<Int|/type/Int> class that then provided the L<abs|/type/abs>
was automatically converted to an L<Int|/type/Int> and it's the L<Int|/type/Int> class that then provided the L<abs|/routine/abs>
method that was called.
This detail is significant when you're using native types for performance gains.
Expand All @@ -599,7 +599,7 @@ As you can see above, the native variant is more than twice slower. The reason i
call requires the native type to be boxed, while no such thing is needed in the non-native
variant, hence the performance loss.
In this particular case, we can simply switch to a subroutine form of L<abs|/type/abs>, which can work
In this particular case, we can simply switch to a subroutine form of L<abs|/routine/abs>, which can work
with native types without boxing them. In other cases, you may need to seek out other solutions
to avoid excessive autoboxing, including switching to non-native types for a portion of the code.
Expand Down
2 changes: 1 addition & 1 deletion doc/Language/objects.pod6
Expand Up @@ -566,7 +566,7 @@ attributes.
# OUTPUT: «x: 5␤»
# OUTPUT: «y: 2␤»
C<Mu.new> calls method L<bless|/type/bless> on its invocant, passing all the named
C<Mu.new> calls method L<bless|/routine/bless> on its invocant, passing all the named
L<arguments|/language/functions#Arguments>. C<bless> creates the new
object, and then walks all subclasses in reverse method resolution order
(i.e. from L<Mu|/type/Mu> to most derived classes) and in each class checks for
Expand Down
14 changes: 7 additions & 7 deletions doc/Language/operators.pod6
Expand Up @@ -731,13 +731,13 @@ along with being a hint to the compiler that it can parallelize the call, the
behaviour is also affected by
L<nodality of the method|/routine/is%20nodal>
being invoked, depending on
which either L<nodemap|/type/nodemap> or L<deepmap|/type/deepmap> semantics are used to perform the call.
which either L<nodemap|/routine/nodemap> or L<deepmap|/routine/deepmap> semantics are used to perform the call.
The nodality is checked by looking up whether the L<Callable|/type/Callable> provides C<nodal>
method. If the hyper is applied to a method, that L<Callable|/type/Callable> is that method
name, looked up on L<List|/type/List> type; if the hyper is applied to a routine (e.g.
C<».&foo>), that routine functions as that L<Callable|/type/Callable>. If the L<Callable|/type/Callable> is
determined to provide C<nodal> method, L<nodemap|/type/nodemap> semantics are used to perform
determined to provide C<nodal> method, L<nodemap|/routine/nodemap> semantics are used to perform
the hyper call, otherwise L<duckmap|/type/duckmap> semantics are used.
Take care to avoid a
Expand Down Expand Up @@ -2637,12 +2637,12 @@ Short-circuits. The result of the left side is bound to C<$_> for the
right side, or passed as arguments if the right side is a
L«C<Callable>|/type/Callable», whose L<count|/type/count> must be C<0> or C<1>.
At first glance, L<notandthen|/type/notandthen> might appear to be the same thing as the L<orelse|/type/orelse>
operator. The difference is subtle: L<notandthen|/type/notandthen> returns
At first glance, L<notandthen|/routine/notandthen> might appear to be the same thing as the L<orelse|/routine/orelse>
operator. The difference is subtle: L<notandthen|/routine/notandthen> returns
L«C<Empty>|/type/Slip#index-entry-Empty-Empty» when it encounters a
L<defined|/type/defined> item (that isn't the last item), whereas L<orelse|/type/orelse> returns that
item. In other words, L<notandthen|/type/notandthen> is a means to act when items aren't
defined, whereas L<orelse|/type/orelse> is a means to obtain the first defined item:
L<defined|/type/defined> item (that isn't the last item), whereas L<orelse|/routine/orelse> returns that
item. In other words, L<notandthen|/routine/notandthen> is a means to act when items aren't
defined, whereas L<orelse|/routine/orelse> is a means to obtain the first defined item:
=begin code
sub all-sensors-down { [notandthen] |@_, True }
Expand Down
6 changes: 3 additions & 3 deletions doc/Language/py-nutshell.pod6
Expand Up @@ -13,8 +13,8 @@ constructs and idioms.
=head2 Hello, world
Let's start with printing "Hello, world!". The L<put|/type/put> keyword in Perl 6
is the equivalent of L<print|/type/print> in Python. Like Python 2, parentheses are
Let's start with printing "Hello, world!". The L<put|/routine/put> keyword in Perl 6
is the equivalent of L<print|/routine/print> in Python. Like Python 2, parentheses are
optional. A newline is added to the end of the line.
Python 2
Expand Down Expand Up @@ -746,7 +746,7 @@ print(user_input)
=end code
When prompted, you can enter C<Hi> or any other string, which will be stored
in the C<user_input> variable. This is similar to L<prompt|/type/prompt> in Perl 6:
in the C<user_input> variable. This is similar to L<prompt|/routine/prompt> in Perl 6:
my $user_input = prompt("Say hi → ");
say $user_input; # OUTPUT: whatever you entered.
Expand Down
6 changes: 3 additions & 3 deletions doc/Language/quoting.pod6
Expand Up @@ -181,7 +181,7 @@ quotes as long as they have parentheses after the call. Thus the following
code will work:
=begin code :allow<B L> :skip-test
say "@neighborsB<.L<join|/type/join>(', ')> and I try our best to coexist peacefully."
say "@neighborsB<.L<join|/routine/join>(', ')> and I try our best to coexist peacefully."
Felix, Danielle, Lucinda and I try our best to coexist peacefully.
=end code
Expand Down Expand Up @@ -259,8 +259,8 @@ It's easier to write and to read this:
X«|< > word quote»
=for code :allow<B L>
say B«<»a b cB«>» L<eqv|/type/eqv> ('a', 'b', 'c'); # OUTPUT: «True␤»
say B«<»a b 42B«>» L<eqv|/type/eqv> ('a', 'b', '42'); # OUTPUT: «False␤», the 42 became an IntStr allomorph
say B«<»a b cB«>» L<eqv|/routine/eqv> ('a', 'b', 'c'); # OUTPUT: «True␤»
say B«<»a b 42B«>» L<eqv|/routine/eqv> ('a', 'b', '42'); # OUTPUT: «False␤», the 42 became an IntStr allomorph
say < 42 > ~~ Int; # OUTPUT: «True␤»
say < 42 > ~~ Str; # OUTPUT: «True␤»
Expand Down
8 changes: 4 additions & 4 deletions doc/Language/subscripts.pod6
Expand Up @@ -504,7 +504,7 @@ May also be negated to test for non-existence:
say %fruit<apple banana>:!exists; # OUTPUT: «(False True)␤»
=end code
To check if I<all> elements of a slice exist, use an L<all|/type/all> junction:
To check if I<all> elements of a slice exist, use an L<all|/routine/all> junction:
=begin code :preamble<my %fruit;>
if all %fruit<apple orange banana>:exists { ... }
Expand Down Expand Up @@ -796,7 +796,7 @@ indexing elements from the end, as in C<@foo[*-1]>.
If not implemented, your type will inherit the default implementation from
C<Any> that always returns C<1> for defined invocants - which is most
likely not what you want. So if the number of elements cannot be known for
your positional type, add an implementation that L<fail|/type/fail>s or L<die|/type/die>s, to
your positional type, add an implementation that L<fail|/routine/fail>s or L<die|/routine/die>s, to
avoid silently doing the wrong thing.
=head3 method AT-POS
Expand Down Expand Up @@ -836,7 +836,7 @@ If you don't implement this, your type will inherit the default
implementation from C<Any>, which returns True for 0 and False for any
other index - which is probably not what you want. So if checking for
element existence cannot be done for your type, add an implementation that
L<fail|/type/fail>s or L<die|/type/die>s, to avoid silently doing the wrong thing.
L<fail|/routine/fail>s or L<die|/routine/die>s, to avoid silently doing the wrong thing.
=head3 method DELETE-POS
Expand Down Expand Up @@ -991,7 +991,7 @@ What "existence" of an element means, is up to your type.
If you don't implement this, your type will inherit the default
implementation from C<Any>, which always returns False - which is probably
not what you want. So if checking for element existence cannot be done for
your type, add an implementation that L<fail|/type/fail>s or L<die|/type/die>s, to avoid
your type, add an implementation that L<fail|/routine/fail>s or L<die|/routine/die>s, to avoid
silently doing the wrong thing.
=head3 method DELETE-KEY
Expand Down
8 changes: 4 additions & 4 deletions doc/Language/traps.pod6
Expand Up @@ -1225,7 +1225,7 @@ See L«C<IO::Handle.close>|/type/IO::Handle#routine_close» for details.
The same rules apply to L<IO::Handle's|/type/IO::Handle> subclass
L<IO::Pipe>, which is what you operate on when reading from a L<Proc|/type/Proc> you get
with routines L<run|/type/run> and L<shell|/type/shell>.
with routines L<run|/routine/run> and L<shell|/routine/shell>.
The caveat applies to L<IO::CatHandle> type as well, though not as severely.
See L«C<IO::CatHandle.close>|/type/IO::CatHandle#method_close» for details.
Expand Down Expand Up @@ -1258,13 +1258,13 @@ Core routines that work with paths can take an L<IO::Path> object, so you don't
need to stringify the paths.
If you do have a case where you need a stringified version of an L<IO::Path>, use
L<absolute|/type/absolute> or L<relative|/type/relative> methods to stringify it into an absolute or relative
L<absolute|/routine/absolute> or L<relative|/routine/relative> methods to stringify it into an absolute or relative
path, respectively.
If you are facing this issue because you use L<chdir|/type/chdir> in your code,
consider rewriting it in a way that does not involve changing the
current directory. For example, you can pass C<cwd> named argument to
L<run|/type/run> without having to use C<chdir> around it.
L<run|/routine/run> without having to use C<chdir> around it.
=head2 Splitting the input data into lines
Expand Down Expand Up @@ -1512,7 +1512,7 @@ simultaneously, from different threads.
=end code
Second, C<»> checks the L<nodality|/routine/is%20nodal> of the routine being
invoked and based on that will use either L<deepmap|/type/deepmap> or L<nodemap|/type/nodemap> to map over
invoked and based on that will use either L<deepmap|/routine/deepmap> or L<nodemap|/routine/nodemap> to map over
the list, which can be different from how a L<map|/type/map> call would map over it:
=begin code
say ((1, 2, 3), [^4], '5')».Numeric; # OUTPUT: «((1 2 3) [0 1 2 3] 5)␤»
Expand Down
10 changes: 5 additions & 5 deletions doc/Type/Any.pod6
Expand Up @@ -51,7 +51,7 @@ Defined as:
method all(--> Junction:D)
Interprets the invocant as a list and creates an
L<all|/type/all>-L<Junction|/type/Junction> from it.
L<all|/routine/all>-L<Junction|/type/Junction> from it.
say so 1 < <2 3 4>.all; # OUTPUT: «True␤»
say so 3 < <2 3 4>.all; # OUTPUT: «False␤»
Expand Down Expand Up @@ -173,7 +173,7 @@ Defined as:
C<deepmap> will apply C<&block> to each element and return a new L<List|/type/List> with
the return values of C<&block>, unless the element does the L<Iterable|/type/Iterable> role.
For those elements L<deepmap|/type/deepmap> will descend recursively into the sublist.
For those elements L<deepmap|/routine/deepmap> will descend recursively into the sublist.
say [[1,2,3],[[4,5],6,7]].deepmap(* + 1);
# OUTPUT: «[[2 3 4] [[5 6] 7 8]]␤»
Expand Down Expand Up @@ -213,7 +213,7 @@ Defined as:
method nodemap(&block --> List) is nodal
C<nodemap> will apply C<&block> to each element and return a new L<List|/type/List> with
the return values of C<&block>. In contrast to L<deepmap|/type/deepmap> it will B<not> descend
the return values of C<&block>. In contrast to L<deepmap|/routine/deepmap> it will B<not> descend
recursively into sublists if it finds elements which L<does|/type/does> the L<Iterable|/type/Iterable> role.
say [[1,2,3], [[4,5],6,7], 7].nodemap(*+1);
Expand Down Expand Up @@ -571,7 +571,7 @@ Defined as:
multi method keys(Any:U: --> List)
multi method keys(Any:D: --> List)
For defined L<Any|/type/Any> returns its L<keys|/type/keys> after calling C<list> on it,
For defined L<Any|/type/Any> returns its L<keys|/routine/keys> after calling C<list> on it,
otherwise calls C<list> and returns it.
my $setty = Set(<Þor Oðin Freija>);
Expand Down Expand Up @@ -844,7 +844,7 @@ produced if it's on. By default, the initial state of that switch is in "on"
position, unless C<:$off> is set to a true value, in which case the initial
state will be "off".
A L<Callable|/type/Callable> from the L<head|/type/head> of C<@conditions> is taken (if any are available)
A L<Callable|/type/Callable> from the L<head|/routine/head> of C<@conditions> is taken (if any are available)
and it becomes the current tester. Each value from the original sequence is
tested by calling the tester L<Callable|/type/Callable> with that value. The state of our
imaginary switch is set to the return value from the tester: if it's truthy,
Expand Down

0 comments on commit c5cec61

Please sign in to comment.