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 29, 2015
2 parents 7dcccbe + 5f81319 commit 2460f90
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Type/List.pod
Expand Up @@ -545,7 +545,7 @@ prints
method rotor(*@cycle, Bool() :$partial)
Returns a list of list, which each sublist is made of elements of the
Returns a list of lists, where each sublist is made up of elements of the
invocant.
In the simplest case, C<@cycle> contains just one integer, in which case the
Expand Down
36 changes: 36 additions & 0 deletions lib/Type/Mu.pod
Expand Up @@ -255,6 +255,42 @@ Takes the given item and passes it to the enclosing C<gather> block.
take (1 .. $max-lotto-numbers).pick(1);
}.say; #-> 32 22 1 17 32 9 (for example)
=head2 method so
method so()
Returns a C<Bool> value representing the logical non-negation of an
expression. One can use this method similarly to the English sentence: "If
that is B<so>, then do this thing". For instance,
my @args = <-a -e -b -v>;
my $verbose-selected = any(@args) eq '-v' | '-V';
if $verbose-selected.so {
say "Verbose option detected in arguments";
} #-> Verbose option detected in arguments
=head2 method not
method not()
Returns a C<Bool> value representing the logical negation of an expression.
Thus it is the opposite of C<so>.
my @args = <-a -e -b>;
my $verbose-selected = any(@args) eq '-v' | '-V';
if $verbose-selected.not {
say "Verbose option not present in arguments";
} #-> Verbose option not present in arguments
Since there is also a prefix version of C<not>, the above code reads better
like so:
my @args = <-a -e -b>;
my $verbose-selected = any(@args) eq '-v' | '-V';
if not $verbose-selected {
say "Verbose option not present in arguments";
} #-> Verbose option not present in arguments
=end pod

# vim: expandtab shiftwidth=4 ft=perl6
1 change: 1 addition & 0 deletions type-graph.txt
Expand Up @@ -215,6 +215,7 @@ role NumericEnumeration
role StringyEnumeration
class Enum does Associative
class Pair is Enum
class PairMap is Hash
class EnumMap is Iterable is Cool does Associative
class Stash is Hash
class PseudoStash is EnumMap
Expand Down

0 comments on commit 2460f90

Please sign in to comment.