Jeremy Howard wrote:

> Sorry--I need to correct this. The correct syntax for a list slice under my
> proposal would actually be:
> 
>   @a[10:20:2][11:30:3]
> 
> It needs the '@' of course since it's returning an array, and it needs to
> use the standard LOL notation with the extension to multiple elements. OTOH:
> 
>   @a[[10:20:2], [11:30:3]]
> 
> would actually just return the 2 points at (10,12,14,16,18,20) and
> (11,14,17,20,23,36,29).

I think a combination of yours and Budda's proposal is actually very
nice:

  @a[10:20:2; 11:30:3]; # ; implies cartesian product of indices
  @a[10..20:2; 11..30:3];  # same with .. syntax
  @a[[10,20,2],[@index], [0,0,0]] # comma-separated index refs means
                                  # individual elements

Is that a possible compromise?

  Christian

Reply via email to