用法记录:
stmt = '''
def repeat( f, a0 ):
yield a0
while True:
a0 = f(a0)
yield a0
n = 2 #求2的平方根
r = repeat( lambda x : (x+n/x)/2 ,1)
for i in range(4):
#print( next(r) )
next(r)
'''
print( "timeit1 = %f" % timeit.timeit( stmt=stmt ) )