Odd words: Difference between revisions

mNo edit summary
Line 1,409:
</pre>
 
=={{header|Ruby}}==
<syntaxhighlight lang="ruby">dict = File.readlines("unixdict.txt", chomp: true).reject{|w| w.size < 5}
dict.each do |w|
odd = w.chars.each_slice(2).map(&:first).join
puts [w.ljust(14), odd].join if w.size > 8 && dict.include?(odd)
end</syntaxhighlight>
{{out}}
<pre>barbarian brain
childbear cider
corrigenda cried
gargantuan grata
headdress hades
palladian plain
propionate point
salvation slain
siltation slain
slingshot sight
statuette saute
supersede spree
supervene spree
terminable trial
</pre>
=={{header|Rust}}==
<syntaxhighlight lang="rust">use std::collections::BTreeSet;
1,149

edits