local path = system.pathForFile("wordlist.txt",system.ResourceDirectory)
local function dictionary(path, trigger)
local dictTable = {}
coroutine.yield(dictTable)
for line in io.lines(path) do
dictTable[line] = true
print(tostring(line))
end
timer.cancel(trigger)
end
local loader = coroutine.wrap(dictionary)
return loader(path, timer.performWithDelay(1, loader, 0))
Comments