Re: Hash and subs question

2017-09-28 Thread ToddAndMargo
On 09/28/2017 09:11 PM, Brandon Allbery wrote: On Fri, Sep 29, 2017 at 12:05 AM, ToddAndMargo > wrote: sub all-dimensions(% (:length(:$x), :width(:$y), :depth(:$z))) {     $x andthen $y andthen $z andthen True } it turn my

Re: Hash and subs question

2017-09-28 Thread Brandon Allbery
On Fri, Sep 29, 2017 at 12:05 AM, ToddAndMargo wrote: > sub all-dimensions(% (:length(:$x), :width(:$y), :depth(:$z))) { > $x andthen $y andthen $z andthen True > } > > it turn my hash into single variables. Is there a way to > test if the right keys are present and

Re: Hash and subs question

2017-09-28 Thread ToddAndMargo
On 09/28/2017 08:56 PM, Brandon Allbery wrote: On Thu, Sep 28, 2017 at 11:52 PM, ToddAndMargo > wrote: I see that SayHash(%H) will take any hash I send it. Is there a way to make the compiler pissed if a sub does not see the

Re: Hash and subs question

2017-09-28 Thread ToddAndMargo
On 09/28/2017 08:56 PM, Brandon Allbery wrote: On Thu, Sep 28, 2017 at 11:52 PM, ToddAndMargo > wrote: I see that SayHash(%H) will take any hash I send it. Is there a way to make the compiler pissed if a sub does not see the

Re: Hash and subs question

2017-09-28 Thread Brandon Allbery
On Thu, Sep 28, 2017 at 11:52 PM, ToddAndMargo wrote: > I see that SayHash(%H) will take any hash I send it. > > Is there a way to make the compiler pissed if a sub does not see > the specific keys int he hash it wants? Or do I need to use loop > with ":exists" and test

Hash and subs question

2017-09-28 Thread ToddAndMargo
Hi All, Looking at this test I threw together; $ perl6 -e 'sub SayHash(%H) {say %H}; my %x = [aaa => "x", b=>"y", c=>"z"];SayHash(%x);' {aaa => x, b => y, c => z} I see that SayHash(%H) will take any hash I send it. Is there a way to make the compiler pissed if a sub does not see the