Jump to content

Anagrams: Difference between revisions

added sample output
m (→‎{{header|Java}}: oops missed one line of output)
(added sample output)
Line 7:
import Data.List
 
groupon f x y = (f x) == (f y)
 
main = do
Line 16:
print . map (map snd) . filter ((==mxl).length) $ wix
 
</pre>
Sample output:
<pre>
*Main> main
[["abel","able","bale","bela","elba"],
["caret","carte","cater","crate","trace"],
["angel","angle","galen","glean","lange"],
["alger","glare","lager","large","regal"],
["elan","lane","lean","lena","neal"],
["evil","levi","live","veil","vile"]]
</pre>
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.