SHOW:
|
|
- or go back to the newest paste.
1 | local path = system.pathForFile("wordlist.txt",system.ResourceDirectory) | |
2 | ||
3 | local function dictionary(path) | |
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 | return dictTable | |
11 | end | |
12 | ||
13 | local loader = coroutine.wrap(dictionary) | |
14 | ||
15 | return loader(path) |