On Fri, May 04, 2001 at 09:06:47PM -0700, Nathan Wiger wrote:
> %a = (%b : %c); # flattened like Perl 5
Why not this?
*%a = (%b, %c); # flattened. splat!
This makes sense to me since * is already proposed as the slurping
operator and since the LHS is providing context for the RHS.
> (%a, %b) = (%c, %d); # kept separate
Indeed.
(%a,%b) = (%b,%a); # Swap 'em.
> (%a, %b) = (%c : %d); # %a slurps all of flattened %c and %d,
> # %b gets nothin'
(*%a, %b) = (%c,%d); # %a slurps, %b gets nothing
(%a, *%b) = (%c,%d); # %a = %c, %b gets the rest
I'm sure your imaginations can twiddle the cardinality knob
appropriate for generalization :-)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
- Apoc2 - Context and variables Nathan Wiger
- Re: Apoc2 - Context and variables Damian Conway
- Re: Apoc2 - Context and variables Nathan Wiger
- Re: Apoc2 - Context and variables John Siracusa
- Re: Apoc2 - Context and variables David L. Nicol
- Re: Apoc2 - Context and variables Edward Peschko
- Re: Apoc2 - Context and variables John Siracusa
- Re: Apoc2 - Context and variables Nathan Wiger
- Re: Apoc2 - Context and variables John Siracusa
- Re: Apoc2 - Context and variables Edward Peschko
- Re: Apoc2 - Context and variables Jonathan Scott Duff
- Re: Apoc2 - Context and variables David L. Nicol
- Re: Apoc2 - Context and variables John Porter
- Re: Apoc2 - Context and variables Simon Cozens
- Re: Apoc2 - Context and variables Graham Barr
- Re: Apoc2 - Context and variables John Porter
- Re: Apoc2 - Context and variables Larry Wall
- Re: Apoc2 - Context and variables Nathan Wiger
