I read the following link about generator:
but I am still not so clear on the use/purpose of a generator function
other than the fact that a generator can retain the state of the local
variables within the fuction body. Can someone out there shed some
lights on this topic or share about how/when you would ever use a
generator function.
but I am still not so clear on the use/purpose of a generator function
other than the fact that a generator can retain the state of the local
variables within the fuction body. Can someone out there shed some
lights on this topic or share about how/when you would ever use a
generator function.
Comment