
How to Use a Generator Function as a Constructor - ruanyf
https://medium.com/@yifeng.ruan/how-to-use-a-generator-function-as-a-constructor-989189350e31
======
slikts
Just, why… Pass in a parameter if you need to set the state, no need to mess
with the context.

------
jaceju
Is there any example for real cases? I don't know the meaning of this
workaround.

~~~
gotofritz
Yes, I was going to ask the same. What is the point of this? What problem does
it solve?

------
geirman
indeed, why would anyone ever want or need to do this?

