Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
try to clarify all() docs a bit more
  • Loading branch information
moritz committed Jan 24, 2015
1 parent 2cfdaf6 commit 470bb4d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/Type/Junction.pod
Expand Up @@ -66,9 +66,11 @@ produce an empty list:
my @a = ();
so all(@a) # True, because there are 0 False's
so all(@a, ?@a) # Does what you might have meant by the above
so all(@a, True) # Explicit way to express the first example
To express "all, but at least one", you can use C<@a && all(@a)
say so @a && all(@a); # False
Negated operators are special-cased when it comes to autothreading.
C<$a !op $b> is rewritten internally as C<!($a op $b)>. The outer
negation collapses any junctions, so the return value always a plain
Expand Down

0 comments on commit 470bb4d

Please sign in to comment.