Jump to content

Prime words: Difference between revisions

(→‎{{header|Raku}}: add some comments to separate the task from the variants)
Line 259:
a aaa age agee ak am ama e egg eke em emma g ga gag gage gam game gamma
ge gee gem gemma gm k keg m ma mae magma make mamma me meek meg q
</pre>
 
=={{header|Phix}}==
<lang Phix>function sap(string word) return sum(apply(word,is_prime))==length(word) end function
sequence words = filter(split_any(get_text("demo/unixdict.txt")," \r\n",no_empty:=true),sap)
printf(1,"%d prime words found: %s\n",{length(words),join(shorten(words,"",3),", ")})</lang>
{{out}}
<pre>
36 prime words found: a, aaa, age, ..., meek, meg, q
</pre>
 
7,806

edits

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