sense on the
variable-level -- this information will be useful when trying to parse
the will predicates.
Thanks,
David Christensen
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 =
Hypothetical here:
If we want to calculate a set of values for a junction which map nicely
to a range with a few outliers, would it be possibly to have a
qualifier :except which allows us to make exceptions to our given
range? I.e.,
(Ignore for the moment the inefficiency of the choice of
domain/already has some other
method of retrieving the same information.
Thanks,
David Christensen
I definitely like the hyper stuff how it is; maybe the answer is to
just define an infix:[[]] operator which returns the crosswise slice
of a nested list of lists. In any case it could be shunted aside to
some package and certainly does not need to be in core.
David
my @transposed =
in
the documented fashion, but would really be promoted in one of a)-e),
breaking what they expected:
(1..5) + ($a-$b) # list context for the expression? Promotes like
what?
(1..5) + +($a-$b) # forced scalar context -- promotes like
documented.
(1..5) + (1) # promotes like what?
Thoughts?
David
Incidentally, just like mathematically (albeit slightly loosely) an
element of a set can be thought of as a function from any singleton,
would it be possible for Perl 6 to provide a fast (under the
syntactical point of view) way to promote a term to a function
returning it?
What's wrong with