View difference between Paste ID: Ma2Tav6z and M5fbeL5G
SHOW: | | - or go back to the newest paste.
1
local path = system.pathForFile("wordlist.txt",system.ResourceDirectory)
2
3-
local function dictionary(path)
3+
local function dictionary(path, trigger)
4
	local dictTable = {}
5
	coroutine.yield(dictTable)
6
	for line in io.lines(path) do
7
		dictTable[line] = true
8
		print(tostring(line))
9
	end
10
	timer.cancel(trigger)
11
end
12
13
local loader = coroutine.wrap(dictionary)
14-
return loader(path)
14+
15
return loader(path, timer.performWithDelay(1, loader, 0))