in python on guile you can do,
def g(yield_fkn,x):
yield_fkn(x+1)
yield_fkn(x+2)
and
def f(l):
for x in l:
g(yield,x)
and this extension works like this in python on guile
list(f([1,2])
--> [1,2,2,3]
Nifty right. This is thanks to the superb infrastructure in scheme (selimited continuations). Not only this, in python-on-guile the generators and iterators are serialisable and hence you can deep copy them. (on the condition that you turn off unboxing in the compiler).