Re: **@args question

2019-01-04 Thread ToddAndMargo via perl6-users
On 1/3/19 12:43 AM, Richard Hainsworth wrote: The term "slurpy" did help a lot. :-) I am writing your explanation down for my records. Well Golly! $ p6 'sub printx(**@args){print(@args)}; printx("abc",1,"def\n");' abc 1 def $ p6 'sub printx(**@args){print @args, "\n"};

Re: **@args question

2019-01-04 Thread ToddAndMargo via perl6-users
On 1/4/19 11:39 AM, ToddAndMargo via perl6-users wrote: On 1/3/19 2:58 AM, Brad Gilbert wrote: On Thu, Jan 3, 2019 at 12:43 AM ToddAndMargo via perl6-users wrote: On 1/2/19 10:17 PM, ToddAndMargo via perl6-users wrote:   > On Wed, Jan 2, 2019 at 8:41 PM ToddAndMargo via perl6-users   >

Re: **@args question

2019-01-04 Thread ToddAndMargo via perl6-users
On 1/3/19 2:58 AM, Brad Gilbert wrote: On Thu, Jan 3, 2019 at 12:43 AM ToddAndMargo via perl6-users wrote: On 1/2/19 10:17 PM, ToddAndMargo via perl6-users wrote: > On Wed, Jan 2, 2019 at 8:41 PM ToddAndMargo via perl6-users > wrote: >> >> Hi All, >> >> Looking at >> >>

Re: **@args question

2019-01-03 Thread Brad Gilbert
On Thu, Jan 3, 2019 at 12:43 AM ToddAndMargo via perl6-users wrote: > > On 1/2/19 10:17 PM, ToddAndMargo via perl6-users wrote: > > > On Wed, Jan 2, 2019 at 8:41 PM ToddAndMargo via perl6-users > > > wrote: > > >> > > >> Hi All, > > >> > > >> Looking at > > >> > > >>

Re: **@args question

2019-01-03 Thread Richard Hainsworth
The term "slurpy" did help a lot. :-) I am writing your explanation down for my records. Well Golly! $ p6 'sub printx(**@args){print(@args)}; printx("abc",1,"def\n");' abc 1 def $ p6 'sub printx(**@args){print @args, "\n"}; printx("abc",1,"def");' abc 1 def Question: $ p6 'sub

Re: **@args question

2019-01-02 Thread ToddAndMargo via perl6-users
On 1/2/19 10:17 PM, ToddAndMargo via perl6-users wrote: > On Wed, Jan 2, 2019 at 8:41 PM ToddAndMargo via perl6-users > wrote: >> >> Hi All, >> >> Looking at >> >>  https://docs.perl6.org/routine/print >> >> I see >> >>  multi sub print(**@args --> True) >> >> Question. 

Re: **@args question

2019-01-02 Thread ToddAndMargo via perl6-users
> On Wed, Jan 2, 2019 at 8:41 PM ToddAndMargo via perl6-users > wrote: >> >> Hi All, >> >> Looking at >> >> https://docs.perl6.org/routine/print >> >> I see >> >> multi sub print(**@args --> True) >> >> Question. If I wanted to create my own print routine >> using **@args, how would I

Re: **@args question

2019-01-02 Thread Brad Gilbert
The variable name in :(**@args) is @args, it could be any valid array identifier like @data sub printx( **@data ){…} Note that there are several forms for slurpy positional arguments. :( @a ) # not slurpy at all, takes one Positional argument and aliases it as @a. :( *@a ) #