load_from_iterator = function(f) local result = {} local i,line,drawing = 0, '' while true do local line = f() if line == nil then break end table.insert(result, line) end if #result == 0 then table.insert(result, '') end return result end