develooper Front page | perl.perl6.users | Postings from November 2017

Re: Set difference using hashes vs array

Thread Previous | Thread Next
From:
ToddAndMargo
Date:
November 24, 2017 02:47
Subject:
Re: Set difference using hashes vs array
Message ID:
55ec951c-8458-69f3-13f6-fc3c02062bb3@zoho.com
On 11/23/2017 06:09 PM, Brandon Allbery wrote:
> On Thu, Nov 23, 2017 at 9:06 PM, ToddAndMargo <ToddAndMargo@zoho.com 
> <mailto:ToddAndMargo@zoho.com>> wrote:
> 
>     On 11/22/2017 08:41 PM, Norman Gaywood wrote:
> 
>         my Set $take1 = (%all (-) %remove) (-) %excludes;
> 
> 
>     What does "Set" do in the above?
> 
> 
> Declares a type, which helps avoid errors. Similarly `my Int $a` means 
> $a can only take Int values.

That explains it.  Pre-declared.  Thank you!

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About