    print(&#039;LOG: Going to the second yield&#039;)
   ...:     yield 2
   ...:

In [2]: simple()
Out[2]: &lt;generator object simple at 0x10752a050&gt;

In [3]: next(_2)
Out[3]: 1

In [4]: next(_2)
LOG: Going to the second yield
Out[4]: 2

In [5]: next(_2)
------------------
StopIteration</code></pre><p>The similar generator can be implemented with <code>snakes</code>:</p>
<pre><code class='lisp'>POFTHEDAY&gt; (snakes:defgenerator simple ()
             (snakes:yield 1)
             (format t &quot;LOG: 