Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Some reflow and corrections
  • Loading branch information
JJ committed Jul 27, 2018
1 parent e85d8d1 commit 423c007
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 29 deletions.
12 changes: 6 additions & 6 deletions doc/Language/functions.pod6
Expand Up @@ -560,13 +560,13 @@ are as easy to use and powerful as C<map>.
=head2 Routines
Routines are code objects that conform to L<type Routine|/type/Routine>, most
notably L<Sub|/type/Sub>, L<Method|/type/Method>, L<Regex|/type/Regex> and
L<Submethod|/type/Submethod>.
Routines are code objects that conform to L<type C<Routine>|/type/Routine>, most
notably L<C<Sub>|/type/Sub>, L<C<Method>|/type/Method>, L<C<Regex>|/type/Regex>
and L<C<Submethod>|/type/Submethod>.
They carry extra functionality in addition to what L<Block|/type/Block>
supplies: they can come as L<multis|#Multi-dispatch>,
you can L<wrap|/type/Routine#method_wrap> them, and exit early with C<return>:
They carry extra functionality in addition to what a L<C<Block>|/type/Block>
supplies: they can come as L<multis|#Multi-dispatch>, you can
L<wrap|/type/Routine#method_wrap> them, and exit early with C<return>:
my $keywords = set <if for unless while>;
Expand Down
53 changes: 30 additions & 23 deletions doc/Type/Cool.pod6
Expand Up @@ -15,10 +15,10 @@ to a string, where its stringy representation is all of its elements
L<joined|/routine/join> by a space. Because L<Array> is L<Cool>, the
appropriate coercion happens automatically.
Methods in C<Cool> coerce the invocant to a more
specific type, and then call the same method on that type. For example both
L<Int> and L<Str> inherit from C<Cool>, and calling method C<substr> on an
C<Int> converts the integer to C<Str> first.
Methods in C<Cool> coerce the invocant to a more specific type, and then call
the same method on that type. For example both L<Int> and L<Str> inherit from
C<Cool>, and calling method C<substr> on an C<Int> converts the integer to
C<Str> first.
123.substr(1, 1); # '2', same as 123.Str.substr(1, 1)
Expand Down Expand Up @@ -149,9 +149,8 @@ Defined as:
method sqrt()
Coerces the invocant to L<Numeric|/type/Numeric> (or in the sub form, the
argument) and returns the square root,
that is, a non-negative number that, when multiplied with itself, produces the
original number.
argument) and returns the square root, that is, a non-negative number that, when
multiplied with itself, produces the original number.
say 4.sqrt; # OUTPUT: «2␤»
say sqrt(2); # OUTPUT: «1.4142135623731␤»
Expand Down Expand Up @@ -205,7 +204,8 @@ Defined as:
sub asin(Numeric(Cool))
method asin()
Coerces the invocant (or in the sub form, the argument) to L<Numeric|/type/Numeric>, and returns its
Coerces the invocant (or in the sub form, the argument) to
L<Numeric|/type/Numeric>, and returns its
L<arc-sine|https://en.wikipedia.org/wiki/Inverse_trigonometric_functions> in
radians.
Expand All @@ -219,8 +219,9 @@ Defined as:
sub cos(Numeric(Cool))
method cos()
Coerces the invocant (or in sub form, the argument) to L<Numeric|/type/Numeric>, interprets it as radians,
returns its L<cosine|https://en.wikipedia.org/wiki/Cosine>.
Coerces the invocant (or in sub form, the argument) to L<Numeric|/type/Numeric>,
interprets it as radians, returns its
L<cosine|https://en.wikipedia.org/wiki/Cosine>.
say 0.cos; # OUTPUT: «1␤»
say pi.cos; # OUTPUT: «-1␤»
Expand Down Expand Up @@ -274,8 +275,8 @@ Defined as:
sub atan2(Numeric() $x, Numeric() $y = 1e0)
method atan2($y = 1e0)
Coerces the arguments (including the invocant in the method form) to L<Numeric|/type/Numeric>,
and returns their two-argument
Coerces the arguments (including the invocant in the method form) to
L<Numeric|/type/Numeric>, and returns their two-argument
L<arc-tangent|https://en.wikipedia.org/wiki/Inverse_trigonometric_functions> in
radians.
Expand Down Expand Up @@ -303,7 +304,8 @@ Defined as:
sub asec(Numeric(Cool))
method asec()
Coerces the invocant (or in sub form, its argument) to L<Numeric|/type/Numeric>, and returns its
Coerces the invocant (or in sub form, its argument) to L<Numeric|/type/Numeric>,
and returns its
L<arc-secant|https://en.wikipedia.org/wiki/Inverse_trigonometric_functions> in
radians.
Expand All @@ -317,8 +319,9 @@ Defined as:
sub cosec(Numeric(Cool))
method cosec()
Coerces the invocant (or in sub form, its argument) to L<Numeric|/type/Numeric>, interprets it as radians,
returns its L<cosecant|https://en.wikipedia.org/wiki/Trigonometric_functions#Reciprocal_functions>,
Coerces the invocant (or in sub form, its argument) to L<Numeric|/type/Numeric>,
interprets it as radians, returns its
L<cosecant|https://en.wikipedia.org/wiki/Trigonometric_functions#Reciprocal_functions>,
that is, the reciprocal of its sine.
say 0.45.cosec; # OUTPUT: «2.29903273150897␤»
Expand All @@ -331,7 +334,8 @@ Defined as:
sub acosec(Numeric(Cool))
method acosec()
Coerces the invocant (or in sub form, its argument) to L<Numeric|/type/Numeric>, and returns its
Coerces the invocant (or in sub form, its argument) to L<Numeric|/type/Numeric>,
and returns its
L<arc-cosecant|https://en.wikipedia.org/wiki/Inverse_trigonometric_functions> in
radians.
Expand All @@ -345,8 +349,9 @@ Defined as:
sub cotan(Numeric(Cool))
method cotan()
Coerces the invocant (or in sub form, its argument) to L<Numeric|/type/Numeric>, interprets it as radians,
returns its L<cotangent|https://en.wikipedia.org/wiki/Trigonometric_functions#Reciprocal_functions>,
Coerces the invocant (or in sub form, its argument) to L<Numeric|/type/Numeric>,
interprets it as radians, returns its
L<cotangent|https://en.wikipedia.org/wiki/Trigonometric_functions#Reciprocal_functions>,
that is, the reciprocal of its tangent.
say 45.cotan; # OUTPUT: «0.617369623783555␤»
Expand All @@ -359,9 +364,10 @@ Defined as:
sub acotan(Numeric(Cool))
method acotan()
Coerces the invocant (or in sub form, its argument) to L<Numeric|/type/Numeric>, and returns its
L<arc-cotangent|https://en.wikipedia.org/wiki/Inverse_trigonometric_functions> in
radians.
Coerces the invocant (or in sub form, its argument) to L<Numeric|/type/Numeric>,
and returns its
L<arc-cotangent|https://en.wikipedia.org/wiki/Inverse_trigonometric_functions>
in radians.
say 45.acotan; # OUTPUT: «0.0222185653267191␤»
say acotan(45) # OUTPUT: «0.0222185653267191␤»
Expand All @@ -373,8 +379,9 @@ Defined as:
sub sinh(Numeric(Cool))
method sinh()
Coerces the invocant (or in method form, its argument) to L<Numeric|/type/Numeric>, and returns its
L<Sine hyperbolicus|https://en.wikipedia.org/wiki/Hyperbolic_function>.
Coerces the invocant (or in method form, its argument) to
L<Numeric|/type/Numeric>, and returns its L<Sine
hyperbolicus|https://en.wikipedia.org/wiki/Hyperbolic_function>.
say 1.sinh; # OUTPUT: «1.1752011936438␤»
say sinh(1); # OUTPUT: «1.1752011936438␤»
Expand Down

0 comments on commit 423c007

Please sign in to comment.