On Fri, 18 Feb 2005 14:35:53 -0800, Ashley Winters
<[EMAIL PROTECTED]> wrote:
> 1 .. sqrt(10) -> LazyList of (1..3)
> 1 .. sqrt(10|20) -> Junction of any(1,2,3, 1,2,3,4)
>
> LazyList does Iterator, but Junction does not. You'd have to use (1 ..
> sqrt(3|6)).values to iterate through the possible values
> semi-randomly.
Okay, changed my mind again.
1 .. sqrt(10|20) -> Junction of any(1,2,3, 1,2,3,4)
therefore, for(1 .. sqrt(10|20)) iterates ONCE, but $_ is a junction.
Anything inside the loop which uses $_ would autothread. Anything
which doesn't use $_ would only get called once. That's insane, right?
for(1 .. sqrt(10|20) {
if($_ > 2) {} # uses junctive value
say "Here"; # called once
bar($_); # calls bar() lots of times
}
> More likely, I'm nuts.
I'm definitely crazy. I give up! I'll stop now, since I clearly don't get it. :)
Ashley Winters