L.map = function *map(f, iter){ for(const i of iter) yield f(i) } L.filter = function *filtr(f, iter){ for(const i of iter) if(f(i)) yield i; }