Re: Favorite non-python language trick?



On Fri, 01 Jul 2005 12:24:44 -0700, Devan L wrote:

> With the exception of reduce(lambda x,y:x*y, sequence), reduce can be
> replaced with sum, and Guido wants to add a product function.

How do you replace:

reduce(lambda x,y: x*y-1/y, sequence)

with sum?


Inquiring minds want to know.


--
Steven.

.



Relevant Pages

  • Re: Favorite non-python language trick?
    ... > replaced with sum, and Guido wants to add a product function. ... The update function is not at all limited to sums and products, ...
    (comp.lang.python)
  • Re: Favorite non-python language trick?
    ... replaced with sum, and Guido wants to add a product function. ... Prev by Date: ...
    (comp.lang.python)
  • Re: * says: Definition: sum{i in N} i = 0
    ... "Divergent series" means: ... is the sum of its terms, ... underlying infinite sequence _if_ the limit exists. ... Euler has literally written is not proved true. ...
    (sci.math)
  • Re: Synthesis of Concurrent Statements for FIR Filter
    ... the convolution in VHDL. ... and -1's and convolved with the impulse sequence 'h'. ... into sum AND THEN put the 'sum' result into 'y'. ... What you have written contains 0 multipliers, 15 x 2-1 muxes, no ...
    (comp.lang.vhdl)
  • Re: * says: Definition: sum{i in N} i = 0
    ... "Divergent series" means: ... is the sum of its terms, then you get the result that a divergent ... that the infinite sequence of naturals is divergent in N. ... _you_ impute that Euler literally has written. ...
    (sci.math)