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

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

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
June 29, 2012 05:16
Subject:
Re: Smartmatch two cents (was... List::Util... when...)
Message ID:
20120629121625.GA25057@cancer.codesimply.com
* 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)) { ... }

-- 
rjbs

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