Jump to content

Change e letters to i in words: Difference between revisions

Added Arturo implementation
(Added XPL0 example.)
(Added Arturo implementation)
Line 537:
victor <- vector
willis <- welles</pre>
 
=={{header|Arturo}}==
 
<lang rebol>words: map read.lines relative "unixdict.txt" => strip
 
loop words 'word [
sw: new size word
if 6 > size word ->
continue
 
iw: replace word "e" "i"
if and? [contains? word "e"][contains? words iw] ->
print [word "=>" iw]
]</lang>
 
{{out}}
 
<pre>analyses => analysis
atlantes => atlantis
bellow => billow
breton => briton
clench => clinch
convect => convict
crises => crisis
diagnoses => diagnosis
enfant => infant
enquiry => inquiry
frances => francis
galatea => galatia
harden => hardin
heckman => hickman
inequity => iniquity
inflect => inflict
jacobean => jacobian
marten => martin
module => moduli
pegging => pigging
psychoses => psychosis
rabbet => rabbit
sterling => stirling
synopses => synopsis
vector => victor
welles => willis</pre>
 
=={{header|AutoHotkey}}==
1,532

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.