RosettaCodeData/Task/Anagrams/Red/anagrams.red

17 lines
366 B
Text
Raw Permalink Normal View History

2018-06-22 20:57:24 +00:00
Red []
m: make map! [] 25000
maxx: 0
2020-02-17 23:21:07 -08:00
foreach word read/lines http://wiki.puzzlers.org/pub/wordlists/unixdict.txt [
2018-06-22 20:57:24 +00:00
sword: sort copy word ;; sorted characters of word
either find m sword [
append m/:sword word
maxx: max maxx length? m/:sword
] [
put m sword append copy [] word
]
]
foreach v values-of m [ if maxx = length? v [print v] ]