[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Re: Neat or horrid?





On 28 May 2000, Ariel Scolnicov wrote:
> abigail@arenanetworks.com writes:

[Hmm.. I don't remember seeing Abigail's original message.]

> > Here's a interesting way to sum the elements of a list:
> > 
> >     sub sum {@_ ? shift () + &sum : 0}

How about:  sub sum {@_ && shift() + &sum}

-- 
Ilmari Karonen
http://www.sci.fi/~iltzu/


==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe