Darren Duncan wrote: > > Jon Lang wrote: >> >> Darren Duncan wrote: >>> I would assume that invoking .perl on a Junction would result in Perl >>> code >>> consisting of the appropriate any/all/etc expression. -- Darren Duncan >> >> Tough to parse, though; and feels like a kludge. I expect better of Perl >> 6. > > What do you mean by "tough to parse" and "feels like a kludge"?
If I'm understanding Larry correctly, then given: my $choice = any(1..10); $choice.perl will return the same thing that the following would: any($choice.eigenstates.«perl) That is, it would return a Junction of Str, not a Str. So the question is how to get something that returns an expression to the effect of: 'any(' ~ $choice.eigenstates.«perl.join(',') ~ ')' Or, if I'm reading Larry incorrectly and $choice.perl provides the latter, how do you get the former (without knowing ahead of time that $choice is an any-junction)? -- The other question is: given $choice as defined above, how do I find out which type of junction it is? Do I somehow call something that would produce the latter string, and then extract the first word from it? Or is there a more direct way to find out which kind of Junction you're dealing with? -- Jonathan "Dataweaver" Lang