Word ladder: Difference between revisions
Content deleted Content added
→{{header|Wren}}: Slightly simpler. |
|||
Line 840:
{{trans|Phix}}
{{libheader|Wren-sort}}
<lang ecmascript>import "io" for File
import "/sort" for Find
var words = File.read("unixdict.txt").trim().split("\n")
Line 863 ⟶ 861:
if (Find.first(next, b) != -1) {
curr.add(b)
System.print
return
}
poss = poss.where { |p| !next.contains(p) }.toList
for (i in 0...next.count) {
var temp =
temp.add(next[i])
todo.add(temp)
|