develooper Front page | perl.perl5.porters | Postings from June 2012

Re: Smartmatch two cents (was... List::Util... when...)

Thread Previous | Thread Next
From:
Elizabeth Mattijsen
Date:
June 30, 2012 06:24
Subject:
Re: Smartmatch two cents (was... List::Util... when...)
Message ID:
47C775D3-5C25-45F4-8ED8-01B39277D8E9@dijkmat.nl
On Jun 29, 2012, at 2:16 PM, Ricardo Signes wrote:
> * Ed Avis <eda@waniasset.com> [2012-06-29T06:54:55]
>> add a new operator 'in' borrowed from Python
>> 
>>    if ($x in @values) { ... }
> 
> Perl6::Junction provides any().
> 
>  if ($x eq any(@values)) { ... }
>  if ($x == any(@values)) { ... }

Maybe a nice project for Devel::Declare encapsulating List::MoreUtils::any ?



Liz



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