Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' of github.com:perl6/doc
  • Loading branch information
jonathanstowe committed Apr 28, 2015
2 parents 1d73e2a + 82bdd79 commit 1732101
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions lib/Language/control.pod
Expand Up @@ -100,17 +100,15 @@ instead the C<{> and C<}> around the block are mandatory:
There is also a form of C<if> called a "statement modifier" form. In this
case, the if and then the condition come after the code you want to run
conditionally. Also, you should not use the C<{> and C<}>. Do note that the
condition is still always evaluated first:
conditionally. Do note that the condition is still always evaluated first:
43.say if 42.say and 0; # says "42" but does not say "43"
43.say if 42.say and 1; # says "42" and then says "43"
say "It is easier to read code when 'if's are kept on left of screen"
if True; # says the above, because it is true
{ 43.say } if True; # creates a closure, does not run it
{ 43.say } if True; # says "43" as well
The last case is one reason why we have the L<do> keyword. The statement
modifier form is probably best used sparingly.
The statement modifier form is probably best used sparingly.
The C<if> statement itself will either return an empty list, if it does not
run the block, or it will return the value which the block produces:
Expand Down
4 changes: 2 additions & 2 deletions lib/Type/Cool.pod
Expand Up @@ -211,7 +211,7 @@ radians.
=head2 routine tan
method tan()
sub acos(Numeric(Cool))
sub tan(Numeric(Cool))
Coerces the invocant (or in sub form, the argument) to L<Numeric|/type/Numeric>, interprets it as radians,
returns its L<tangens|https://en.wikipedia.org/wiki/Tangent>.
Expand Down Expand Up @@ -274,7 +274,7 @@ radians.
=head2 routine cotan
method cotan()
sub cotangens(Numeric(Cool))
sub cotan(Numeric(Cool))
Coerces the invocant (or in sub form, its argument) to L<Numeric|/type/Numeric>, interprets it as radians,
returns its L<cotangens|https://en.wikipedia.org/wiki/Trigonometric_functions#Reciprocal_functions>,
Expand Down

0 comments on commit 1732101

Please sign in to comment.