Odd words: Difference between revisions
no edit summary
m (→version 2, caseless: adjusted the record count.) |
No edit summary |
||
Line 519:
=={{header|Julia}}==
<lang julia>function
println("Word source: $wordfile\n")
words = split(read(wordfile, String), r"\s+")
dict, shown = Dict(w => 1 for w in words), 0
for word in words
if (
toshow > 0 && toshow < shown && break
end
end
end
isoddword(w, d) = (o = mapreduce(i -> w[i], *, 1:2:length(w)); haskey(d, o) ? rpad(w, 16) * ": " * o : "")
foreachword("unixdict.txt", isoddword, minlen=9, numcols=1)
</lang>{{out}}
<pre>
Word source: unixdict.txt
barbarian
childbear
corrigenda
gargantuan
headdress
palladian
propionate
salvation
siltation
slingshot
statuette
supersede
supervene
terminable
</pre>
|