Words from neighbour ones: Difference between revisions

Content added Content deleted
Line 1,575: Line 1,575:
mut result :=''
mut result :=''
unixdict := os.read_file('./unixdict.txt') or {panic('file not found')}
unixdict := os.read_file('./unixdict.txt') or {panic('file not found')}
for index, word in neighbour(unixdict) {
for idx, word in neighbour(unixdict) {
if ((idx + 1) % 6 == 0) == true {result += '$word \n'} else {result += '$word '}
idx := index + 1
if (idx % 6 == 0) == true {result += '$word \n'} else {result += '$word '}
}
}
println(result)
println(result)