Odd words: Difference between revisions
Content added Content deleted
(Ada version) |
Drkameleon (talk | contribs) (Added Arturo implementation) |
||
Line 192: | Line 192: | ||
terminable: trial |
terminable: trial |
||
</pre> |
</pre> |
||
=={{header|Arturo}}== |
|||
<lang rebol>words: read.lines relative "unixdict.txt" |
|||
getOdd: function [w][ |
|||
odd: new "" |
|||
loop.with:'i w 'ch [ |
|||
if even? i -> 'odd ++ ch |
|||
] |
|||
odd |
|||
] |
|||
loop words 'word [ |
|||
ow: getOdd word |
|||
if and? [4 < size ow][contains? words ow] -> |
|||
print [word "=>" ow] |
|||
]</lang> |
|||
{{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|AWK}}== |
=={{header|AWK}}== |
||
<lang AWK> |
<lang AWK> |