Find words which contain the most consonants: Difference between revisions

Content added Content deleted
(add RPL)
m (→‎{{header|Wren}}: Minor tidy)
Line 4,207: Line 4,207:
=={{header|Wren}}==
=={{header|Wren}}==
{{libheader|Wren-fmt}}
{{libheader|Wren-fmt}}
{{libheader|Wren-seq}}
<syntaxhighlight lang="ecmascript">import "io" for File
<syntaxhighlight lang="ecmascript">import "io" for File
import "/fmt" for Fmt
import "./fmt" for Fmt
import "/seq" for Lst


var wordList = "unixdict.txt" // local copy
var wordList = "unixdict.txt" // local copy
Line 4,244: Line 4,242:
var s = (count == 1) ? "" : "s"
var s = (count == 1) ? "" : "s"
System.print("%(count) word%(s) found with %(i) unique consonants:")
System.print("%(count) word%(s) found with %(i) unique consonants:")
for (chunk in Lst.chunks(wordGroups[i], 5)) Fmt.print("$-14s", chunk)
Fmt.tprint("$-14s", wordGroups[i], 5)
System.print()
System.print()
}
}