Harmonic series: Difference between revisions

Content added Content deleted
(Remove unwanted and unnecessary white space from task header. Makes it look like crap on mobile browsers.)
(→‎{{header|Python}}: Functor law tweak to eliminate lambda)
Line 877:
from fractions import Fraction
from itertools import accumulate, count, islice
from operator import add
 
 
Line 885 ⟶ 886:
'''
return accumulate(
map(1 / Fraction,(x) for x in count(1)),
lambda a, x: a + 1 / xadd
)