Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function filterLines(filter, source, ...)
- local supply = coroutine.wrap(
- function(filter, ...)
- for line in ... do
- if filter(line) then
- coroutine.yield(line)
- end
- end
- end
- )
- supply(filter, source, ...)
- return supply
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement