given fun(put, a) a lambda that can call $put 0 or more times,
some_range.emit!fun computes a range formed of all the calls to $put

eg:
assert(9.iota.emit!(int,(put,a){if(a%2) put(a*a);}).equal([1, 9, 25, 49]));

in this case it can be done by combining map and filter but in other cases emit is more powerful and an equivalent (with map,filter,joiner) can be inefficient and more complex.

seeĀ https://github.com/timotheecour/dtools/blob/master/dtools/util/emit.d

could that be turned into std.algorithm.iteration.emit (after addressing comments) ?

Any comments would be appreciated (especially regarding whether we can get rid of the 1st template argument with type deduction)