ABC words: Difference between revisions

Content added Content deleted
No edit summary
mNo edit summary
Line 95: Line 95:
=={{header|Julia}}==
=={{header|Julia}}==
<lang julia>function lettersinorder(dictfile, letters)
<lang julia>function lettersinorder(dictfile, letters)
chars, len = sort(collect(letters)), length(letters)
chars = sort(collect(letters))
for word in split(read(dictfile, String))
for word in split(read(dictfile, String))
positions = [findfirst(c -> c == ch, word) for ch in chars]
positions = [findfirst(c -> c == ch, word) for ch in chars]