Dave Whipp wrote:
I notice everyone still want Int context for eval of the block: Pease don't forget about hashes. Is there such a thing as 'hashkey context'?
I doubt it. Unless you count Str context.
Perl6 is much better than Perl5 for naming parameters. Could we make the following work? ( low=>@under, mid=>@in_range, high=>@over ) = partition @input -> $v { $v < 10 ?? "low" :: $v > 20 ?? "high" :: "mid"; };
I very much doubt it. I think at that point you really want: for @input -> $v { push ($v < 10 ?? @under :: $v > 20 ?? @over :: @in_range), $v; }
Also, can I return superpositions (sorry, junctions), to provide multiple classifications? Or would I return an array for that?
A (dis)junction ought to work there. Damian