Python Generators in Depth
Somewhat off-topic, but how are generators different than returning an object with a closed over environment?  For instance, his first example in CoffeeScript would be:<p><pre><code>    runningAvg = ->
            count = 0
            total = 0

            send: (value) ->
                    total += value
                    count += 1
                    total/count
                
    r = runningAvg()
    console.log r.send 10
    console.log r.send 5
    console.log r.send 0
    console.log r.send 0</code></pre>