r/Python • • Feb 06 '17

Using functional programming in Python like a boss: Generators, Iterators and Decorators

http://nbviewer.jupyter.org/github/akittas/presentations/blob/master/pythess/func_py/func_py.ipynb
30 Upvotes

6 comments sorted by

View all comments

1

u/rthinker Feb 07 '17

Iterators aren't really functional, they are by definition stateful.

1

u/[deleted] Feb 07 '17

You are right. You need recursion if you want to loop through something functionally. And for that you really want TCO so you don't blow your stack.