Skip to content

Commit 1c7e923

Browse files
committed
Document Mu.so
1 parent f6a1eb5 commit 1c7e923

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lib/Type/Mu.pod

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,20 @@ Takes the given item and passes it to the enclosing C<gather> block.
255255
take (1 .. $max-lotto-numbers).pick(1);
256256
}.say; #-> 32 22 1 17 32 9 (for example)
257257
258+
=head2 method so
259+
260+
method so()
261+
262+
Returns a C<Bool> value representing the logical non-negation of an
263+
expression. One can use this method similarly to the English sentence: "If
264+
that is B<so>, then do this thing". For instance,
265+
266+
my @args = <-a -e -b -v>;
267+
my $verbose-selected = any(@args) eq '-v' | '-V';
268+
if $verbose-selected.so {
269+
say "Verbose option detected in arguments";
270+
} #-> Verbose option detected in arguments
271+
258272
=end pod
259273

260274
# vim: expandtab shiftwidth=4 ft=perl6

0 commit comments

Comments
 (0)