Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,11 +1,11 @@
|
|||
from itertools import islice
|
||||
|
||||
def fib():
|
||||
yield 0
|
||||
"""Yield fib[n+1] + fib[n]"""
|
||||
yield 1
|
||||
a, b = fib(), fib()
|
||||
next(b)
|
||||
lhs, rhs = fib(), fib()
|
||||
# move lhs one iteration ahead
|
||||
yield next(lhs)
|
||||
while True:
|
||||
yield next(a)+next(b)
|
||||
yield next(lhs)+next(rhs)
|
||||
|
||||
print(tuple(islice(fib(), 10)))
|
||||
f=fib()
|
||||
print [next(f) for _ in range(9)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue