Sha256: 05f55e629e731d083ba88d28cf138b2ed4455486b55fb109d209a02e7f0fe08c
Contents?: true
Size: 326 Bytes
Versions: 394
Compression:
Stored size: 326 Bytes
Contents
module Anagram (anagramsFor) where import Data.List (sort) import Data.Char (toLower) anagramsFor :: String -> [String] -> [String] anagramsFor word = filter (isAnagram . normalize) where normalize xs = let nxs = map toLower xs in (nxs, sort nxs) (nw, sw) = normalize word isAnagram (w, s) = nw /= w && sw == s
Version data entries
394 entries across 394 versions & 1 rubygems