develooper Front page | perl.perl6.language | Postings from April 2006

Re: The "whatever" context

Thread Previous
From:
Yuval Kogman
Date:
April 10, 2006 14:28
Subject:
Re: The "whatever" context
Message ID:
20060410212818.GT24271@woobling.org
On Mon, Apr 10, 2006 at 14:25:35 -0700, Larry Wall wrote:

> : 	my $x = grep { ... } @list; # returns count
> 
> I think that's already "whatever context".  $x contains the resulting array.
> It's only if you later say +$x that you'll get the number of elems.

Just for grep or for any function?

If just grep that means that grep simply doesn't use want.

If it's any function, then it means that all are constants are
"list" or "whatever", and all we really have are coercers.

-- 
  Yuval Kogman <nothingmuch@woobling.org>
http://nothingmuch.woobling.org  0xEBD27418



Thread Previous


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