Skip to content

Commit

Permalink
Minor rephrasing and example compilation fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ committed Jun 25, 2018
1 parent 2054d3c commit e7d26b1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions doc/Type/Junction.pod6
Expand Up @@ -60,15 +60,17 @@ Note that the compiler is allowed, but not required, to parallelize
autothreading (and Junction behavior in general), so it is usually an
error to autothread junctions over code with side effects.
It is possible I<future language versions> will include short-circuiting
It is possible that I<future language versions> will include short-circuiting
behaviour in Junctions. For example one or more routine calls (C<a()>, C<b()>,
or C<c()>) in the code below might not get executed at all, if the result of
the conditional has been fully determined from routine calls already performed
(only one truthy return value is required to know the entire Junction is true):
(only one truthy return value is enough to know the entire Junction is true):
if a() | b() | c() {
say "At least one of the routines was called and returned a truthy value"
}
=begin code :preamble<sub a(){}; sub b(){}; sub c(){}>
if a() | b() | c() {
say "At least one of the routines was called and returned a truthy value"
}
=end code
Junctions are meant to be used as matchers in boolean context; introspection
of junctions is not supported. If you feel the urge to introspect a junction,
Expand Down

0 comments on commit e7d26b1

Please sign in to comment.