On Wed, Jul 28, 2010 at 8:34 AM, Dave Whipp <d...@dave.whipp.name> wrote:
> To squint at this slightly, in the context that we already have 0...1e10 as
> a sequence generator, perhaps the semantics of iterating a range should be
> unordered -- that is,
>
>  for 0..10 -> $x { ... }
>
> is treated as
>
>  for (0...10).pick(*) -> $x { ... }

Makes me think about parallel operations.

for 0...10 -> $x { ... } # 0 through 10 in order
for 0..10 -> $x { ... } # Spawn 11 threads, $x=0 through 10 concurrently
for 10..0 -> $x { ... } # A no-op
for 10...0 -> $x { ... } # 10 down to 0 in order

though would a parallel batch of an anonymous block be more naturally written as
all(0...10) -> $x { ... } # Spawn 11 threads

-y

Reply via email to