'use strict'; module.exports = filterIterator; function* filterIterator(xs, pred) { for (let x of xs) { if (pred(x)) yield x; } }