Word wheel: Difference between revisions

m
→‎{{header|REXX}}: used a simpler "filter" (to ensure each letter is used as many times that it is represented in the grid).
m (→‎{{header|Haskell}}: Added an unoptimized Haskell draft.)
m (→‎{{header|REXX}}: used a simpler "filter" (to ensure each letter is used as many times that it is represented in the grid).)
Line 406:
if iFID==''|iFID=="," then iFID= 'UNIXDICT.TXT' /* " " " " " " */
oMinL= minL; minL= abs(minL) /*if negative, then don't show a list. */
gridU= grid; upper gridU; guAir gAir= inflate(gridU) /*get an uppercase version of the grid.*/
Lg= length(grid); Hg= Lg%2
c= substr(grid, Hg+1,1 ); upper c /*get uppercase center letter in grid. */
Line 431:
good= good + 1 /*bump # center─letter words in dict. */
if verify(u, gridU)\==0 then iterate /*word contains a letter not in grid. */
air=if \deflate(inflate(u), gAir) then iterate /*have all the letters been found ? /*insert "air" (blanks) between letters*/
if \deflate(air, guAir) then iterate /*have all the letters been found ? */
$= $ u /*add this word to the "found" list. */
end /*recs*/
Line 448 ⟶ 447:
say; #= words($); $= strip($)
say ' number of word wheel words in the dictionary: ' right( commas(# ), 9)
if #==0 | omLenoMinL<0 then exit #
say
say ' The list of word wheel words found:'; say copies('─', length($)); say lower($)