diff options
author | Todd M. Guerra <toddguerra@gmail.com> | 2015-10-09 11:14:29 -0400 |
---|---|---|
committer | Todd M. Guerra <toddguerra@gmail.com> | 2015-10-09 11:14:29 -0400 |
commit | fc3c56ee938dbb7231127465b0e9ab5fa7f2da40 (patch) | |
tree | 444181fbb299567b566a038ab4241e31ca519a97 /perl6.html.markdown | |
parent | 6d3f52b7f01409818853de6148abf1d8fe57fab0 (diff) | |
parent | dcd9093d6467166a2946008c55f5e0582a15e20c (diff) |
Merge remote-tracking branch 'adambard/master'
Conflicts:
java.html.markdown
Diffstat (limited to 'perl6.html.markdown')
-rw-r--r-- | perl6.html.markdown | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/perl6.html.markdown b/perl6.html.markdown index 63c0830a..43327edb 100644 --- a/perl6.html.markdown +++ b/perl6.html.markdown @@ -132,7 +132,7 @@ sub with-named($normal-arg, :$named) { with-named(1, named => 6); #=> 7 # There's one gotcha to be aware of, here: # If you quote your key, Perl 6 won't be able to see it at compile time, -# and you'll have a single Pair object as a positional paramater, +# and you'll have a single Pair object as a positional parameter, # which means this fails: with-named(1, 'named' => 6); @@ -197,7 +197,7 @@ sub mutate($n is rw) { say "\$n is now $n !"; } -# If what you want is a copy instead, use `is copy`. +# If what you want a copy instead, use `is copy`. # A sub itself returns a container, which means it can be marked as rw: my $x = 42; @@ -234,7 +234,7 @@ say "Quite truthy" if True; # - Ternary conditional, "?? !!" (like `x ? y : z` in some other languages) my $a = $condition ?? $value-if-true !! $value-if-false; -# - `given`-`when` looks like other languages `switch`, but much more +# - `given`-`when` looks like other languages' `switch`, but much more # powerful thanks to smart matching and thanks to Perl 6's "topic variable", $_. # # This variable contains the default argument of a block, @@ -1429,7 +1429,7 @@ for <well met young hero we shall meet later> { # A flip-flop can change state as many times as needed: for <test start print it stop not printing start print again stop not anymore> { .say if $_ eq 'start' ^ff^ $_ eq 'stop'; # exclude both "start" and "stop", - #=> "print this printing again" + #=> "print it print again" } # you might also use a Whatever Star, @@ -1461,4 +1461,3 @@ If you want to go further, you can: - Come along on `#perl6` at `irc.freenode.net`. The folks here are always helpful. - Check the [source of Perl 6's functions and classes](https://github.com/rakudo/rakudo/tree/nom/src/core). Rakudo is mainly written in Perl 6 (with a lot of NQP, "Not Quite Perl", a Perl 6 subset easier to implement and optimize). - Read [the language design documents](http://design.perl6.org). They explain P6 from an implementor point-of-view, but it's still very interesting. - |