Skip to content

Commit 5954ab0

Browse files
committed
Reflow and hashtag correction
Can't figure out what the TODO refers to, so it's just eliminated. Refs #2277
1 parent 198f0ac commit 5954ab0

File tree

1 file changed

+21
-23
lines changed

1 file changed

+21
-23
lines changed

doc/Language/syntax.pod6

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ See the L<Signatures|/type/Signature> documentation for more about signatures.
659659
my Int $x where * > 3 = 7; # same constraint, but using L<Whatever> shorthand
660660
661661
See L<Variable Declarators and
662-
Scope|/language/variables#Variable_Declarators_and_Scope>
662+
Scope|/language/variables#Variable_declarators_and_scope>
663663
for more details on other scopes (our, has).
664664
665665
=head3 Subroutine declaration
@@ -716,15 +716,12 @@ Inside of a class, you can also declare multi-dispatch methods.
716716
717717
=head1 Subroutine calls
718718
719-
Subroutines are created with the keyword C<sub> followed
720-
by an optional name, an optional signature and a code block.
721-
Subroutines are lexically scoped, so if a name is specified
722-
at the declaration time, the same name can be used
723-
in the lexical scope to invoke the subroutine.
724-
A subroutine is an instance of type L<Sub|/type/Sub> and
725-
can be assigned to any container.
726-
727-
=comment TODO
719+
Subroutines are created with the keyword C<sub> followed by an optional
720+
name, an optional signature and a code block. Subroutines are lexically
721+
scoped, so if a name is specified at the declaration time, the same name
722+
can be used in the lexical scope to invoke the subroutine. A subroutine
723+
is an instance of type L<Sub|/type/Sub> and can be assigned to any
724+
container.
728725
729726
=begin code :skip-test
730727
foo; # Invoke the function foo with no arguments
@@ -737,8 +734,8 @@ can be assigned to any container.
737734
738735
When declared within a class, a subroutine is named "method": methods
739736
are subroutines invoked against an object (i.e., a class instance).
740-
Within a method the special variable C<self> contains the object instance
741-
(see L<Methods|/language/classtut#Methods>).
737+
Within a method the special variable C<self> contains the object
738+
instance (see L<Methods|/language/classtut#Methods>).
742739
743740
=begin code :preamble<class Person {
744741
has Int $.age;
@@ -758,13 +755,13 @@ For more information see L<functions|/language/functions>.
758755
759756
=head2 Precedence drop
760757
761-
In the case of method invocation (i.e., when invoking a subroutine against
762-
a class instance) it is possible to apply the C<precedence drop>, identified
763-
by a colon C<:> just after the method name and before the argument list.
764-
The argument list takes precedence over the method call, that on the other
765-
hand "drops" its precedence. In order to better understand consider
766-
the following simple example (extra spaces have been added just to align
767-
method calls):
758+
In the case of method invocation (i.e., when invoking a subroutine
759+
against a class instance) it is possible to apply the C<precedence
760+
drop>, identified by a colon C<:> just after the method name and before
761+
the argument list. The argument list takes precedence over the method
762+
call, that on the other hand "drops" its precedence. In order to better
763+
understand consider the following simple example (extra spaces have been
764+
added just to align method calls):
768765
769766
=begin code :skip-test
770767
my $band = 'Foo Fighters';
@@ -780,11 +777,12 @@ yields precedence to the rightmost one.
780777
781778
See L<Operators|/language/operators> for lots of details.
782779
783-
Operators are functions with a more symbol heavy and composable syntax. Like
784-
other functions, operators can be multi-dispatch to allow for context-specific
785-
usage.
780+
Operators are functions with a more symbol heavy and composable syntax.
781+
Like other functions, operators can be multi-dispatch to allow for
782+
context-specific usage.
786783
787-
There are five types (arrangements) for operators, each taking either one or two arguments.
784+
There are five types (arrangements) for operators, each taking either
785+
one or two arguments.
788786
789787
=begin code :skip-test
790788
++$x # prefix, operator comes before single input

0 commit comments

Comments
 (0)