home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!sybus.sybus.com!myrddin!tct!chip
- From: chip@tct.com (Chip Salzenberg)
- Subject: Re: In 5.0, are we gonna get...
- Message-ID: <2B2D2498.874E@tct.com>
- Date: Tue, 15 Dec 1992 00:19:36 GMT
- References: <1992Dec14.043835.23009@reed.edu> <1992Dec14.192007.7534@wdl.loral.com>
- Organization: TC Telemanagement, Clearwater, FL
- Lines: 21
-
- According to mab@wdl39.wdl.loral.com (Mark A Biggar):
- >Larry has talked about adding a 'reduce' operator that calls a special
- >sort like function (used $a,$b for arg passing) on each element of a
- >list for doing summations like so:
- >
- > $sum = reduce {$a+$b} 1,34,$x,45,-8,0.1;
-
- Interesting. That operation would be a generalization of join:
-
- $x = join(":", @foo);
-
- and
-
- $x = reduce {$a.":".$b} @foo;
-
- would be equivalent (though join would probably be much faster).
- --
- Chip Salzenberg at Teltronics/TCT <chip@tct.com>, <73717.366@compuserve.com>
- "you make me want to break the laws of time and space / you make me
- want to eat pork / you make me want to staple bagles to my face /
- and remove them with a pitchfork" -- Weird Al Yankovic, "You Make Me"
-