Get the latest tech news
Haskelling My Python
Reimplementing Haskell lazy infinite lists using Python generators
A few years ago, Pleng showed me a really cool trick you can do with lazy infinite lists in Haskell. That means our integral is some leading constant plus all the terms of the original Taylor series shifted over by one and divided by $n+1$. Also, Isaac noted that this trick also works using Python’s fractions module to get the answer as a rational number instead of a float.
Or read this on Hacker News