David Christensen writes:
> I'm looking in S09, and reading about junctions.  It seems to me that 
> if we have a junction $j which we use to index into an array or a hash, 
> it should DWIM and return a junction of the corresponding values.
> 
> @ar=[1..10];
> %hash=(a=>1,b=>4,c=>7);
> 
> $j=1|2|3;
> $k="a"|"c";
> 
> $u = @ar[$j];       # 2|3|4
> $v = %hash{$k}; # 1|7
> 
> Does this make sense to others?

Well, if we replaced @ar[$j] with, say,  @ar.get($j), what you're
proposing happens automatically.  So I think that it's the right thing
to do.

Luke

Reply via email to