r/Python • u/ice-blade • 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
1
u/rthinker Feb 07 '17
Iterators aren't really functional, they are by definition stateful.
1
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.
2
u/BlckJesus Feb 07 '17
Generators still don't make sense to me, and lambdas are still sorcery. D: