Re: Do slurpy parameters auto-flatten arrays?

2005-08-04 Thread TSa (Thomas Sandlaß)
HaloO, Luke Palmer wrote: On 8/3/05, Aankhen [EMAIL PROTECTED] wrote: On 8/3/05, Piers Cawley [EMAIL PROTECTED] wrote: So how *do* I pass an unflattened array to a function with a slurpy parameter? Good question. I would have thought that one of the major gains from turning arrays and

Re: Do slurpy parameters auto-flatten arrays?

2005-08-04 Thread TSa (Thomas Sandlaß)
HaloO, Piers Cawley wrote: By the way, if flattening that way, what's the prototype for zip? We can after all do: zip @ary1, @ary2, @ary3, ... @aryn How about sub zip( List [EMAIL PROTECTED] ) {...} a slurpy List of Array of List. The return value is a not yet iterated Code object

Re: Do slurpy parameters auto-flatten arrays?

2005-08-03 Thread Piers Cawley
Luke Palmer [EMAIL PROTECTED] writes: On 7/26/05, Ingo Blechschmidt [EMAIL PROTECTED] wrote: Hi, are the following assumptions correct? sub foo ([EMAIL PROTECTED]) { @args[0] } say ~foo(a, b, c); # a Yep. my @array = a b c d; say ~foo(@array);# a b c d (or

Re: Do slurpy parameters auto-flatten arrays?

2005-08-03 Thread Aankhen
On 8/3/05, Piers Cawley [EMAIL PROTECTED] wrote: So how *do* I pass an unflattened array to a function with a slurpy parameter? Good question. I would have thought that one of the major gains from turning arrays and hashes into references in scalar context is the ability to specify an

Re: Do slurpy parameters auto-flatten arrays?

2005-08-03 Thread Luke Palmer
On 8/3/05, Aankhen [EMAIL PROTECTED] wrote: On 8/3/05, Piers Cawley [EMAIL PROTECTED] wrote: So how *do* I pass an unflattened array to a function with a slurpy parameter? Good question. I would have thought that one of the major gains from turning arrays and hashes into references in

Re: Do slurpy parameters auto-flatten arrays?

2005-08-03 Thread Miroslav Silovic
[EMAIL PROTECTED] wrote: So how *do* I pass an unflattened array to a function with a slurpy parameter? I don't ~~ @larry, but my guess(es) would be bar([EMAIL PROTECTED]) or bar([EMAIL PROTECTED]) Miro

Re: Do slurpy parameters auto-flatten arrays?

2005-08-03 Thread Piers Cawley
Luke Palmer [EMAIL PROTECTED] writes: On 8/3/05, Aankhen [EMAIL PROTECTED] wrote: On 8/3/05, Piers Cawley [EMAIL PROTECTED] wrote: So how *do* I pass an unflattened array to a function with a slurpy parameter? Good question. I would have thought that one of the major gains from

Re: Do slurpy parameters auto-flatten arrays?

2005-07-27 Thread TSa (Thomas Sandlaß)
Ingo Blechschmidt wrote: Hi, ReHi, are the following assumptions correct? I don't know in general. But see my assumptions below for comparison. They are derived from my type theoretic approach and as such might collide with Perl6's referential semantics. In particular with the

Re: Do slurpy parameters auto-flatten arrays?

2005-07-27 Thread Luke Palmer
On 7/26/05, Ingo Blechschmidt [EMAIL PROTECTED] wrote: Hi, are the following assumptions correct? sub foo ([EMAIL PROTECTED]) { @args[0] } say ~foo(a, b, c); # a Yep. my @array = a b c d; say ~foo(@array);# a b c d (or a?) say ~foo(@array, z); # a b c

Do slurpy parameters auto-flatten arrays?

2005-07-26 Thread Ingo Blechschmidt
Hi, are the following assumptions correct? sub foo ([EMAIL PROTECTED]) { @args[0] } say ~foo(a, b, c); # a my @array = a b c d; say ~foo(@array);# a b c d (or a?) say ~foo(@array, z); # a b c d (or a?) say ~foo([EMAIL PROTECTED]); # a say