Odd words: Difference between revisions
Content added Content deleted
(Added a Lua solution) |
Alextretyak (talk | contribs) (Added 11l) |
||
Line 9: | Line 9: | ||
{{Template:Strings}} |
{{Template:Strings}} |
||
<br><br> |
<br><br> |
||
=={{header|11l}}== |
|||
{{trans|Python}} |
|||
<lang 11l>V wordSet = Set(File(‘unixdict.txt’).read().split("\n")) |
|||
Set[String] oddWordSet |
|||
L(word) wordSet |
|||
I word.len >= 9 & word[(0..).step(2)] C wordSet |
|||
oddWordSet.add(word[(0..).step(2)]) |
|||
L(i) sorted(Array(oddWordSet)) |
|||
print(i)</lang> |
|||
{{out}} |
|||
<pre> |
|||
brain |
|||
cider |
|||
cried |
|||
grata |
|||
hades |
|||
plain |
|||
point |
|||
saute |
|||
sight |
|||
slain |
|||
spree |
|||
trial |
|||
</pre> |
|||
=={{header|Ada}}== |
=={{header|Ada}}== |