Jump to content

Words containing "the" substring: Difference between revisions

Standard ML: simplify
(add Standard ML)
(Standard ML: simplify)
Line 918:
 
=={{header|Standard ML}}==
<lang sml>val noThehasThe = SubstringString.isEmpty o #2 o Substring.positionisSubstring "the"
 
fun isThe12 s = size s > 11 andalso hasThe s
fun printThe12 s =
if Substring.size s < 12 orelse noThe s
then ()
else print (Substring.string s ^ "\n")
 
val () = (List.app printThe12print
((String.concatWith " "
o Substring.tokens Char.isSpace
o List.filter isThe12
o Substring.full
o SubstringString.tokens Char.isSpace
o TextIO.inputAll) TextIO.stdIn ^ "\n")</lang>
{{out}}
<pre>authenticate chemotherapy chrysanthemum clothesbrush clotheshorse eratosthenes featherbedding featherbrain featherweight gaithersburg hydrothermal lighthearted mathematician neurasthenic nevertheless northeastern northernmost otherworldly parasympathetic physiotherapist physiotherapy psychotherapeutic psychotherapist psychotherapy radiotherapy southeastern southernmost theoretician weatherbeaten weatherproof weatherstrip weatherstripping</pre>
<pre>authenticate
chemotherapy
chrysanthemum
clothesbrush
clotheshorse
eratosthenes
featherbedding
featherbrain
featherweight
gaithersburg
hydrothermal
lighthearted
mathematician
neurasthenic
nevertheless
northeastern
northernmost
otherworldly
parasympathetic
physiotherapist
physiotherapy
psychotherapeutic
psychotherapist
psychotherapy
radiotherapy
southeastern
southernmost
theoretician
weatherbeaten
weatherproof
weatherstrip
weatherstripping</pre>
 
=={{header|VBA}}==
559

edits

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