Skip to content

Instantly share code, notes, and snippets.

@vinipsmaker
Last active August 29, 2015 13:55
Show Gist options
  • Save vinipsmaker/8739429 to your computer and use it in GitHub Desktop.
Save vinipsmaker/8739429 to your computer and use it in GitHub Desktop.
def fibonacci(n):
a,b = 0,1
ret = [a]
for i in range(n):
a,b = b,a+b
ret.append(a)
return ret
def consumer(n):
work = fibonacci(n)
ret = 0
for i in work:
ret += i
return ret
consumer(10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment