Sha256: c82e4054790fedf3af7ea7ccb60568b8c21ece7b6b585695268171fa95f8be5e
Contents?: true
Size: 425 Bytes
Versions: 396
Compression:
Stored size: 425 Bytes
Contents
module Anagram open System let normalize (str:string) = new string(str.ToLowerInvariant().ToCharArray() |> Array.sort) let unequal str other = not (String.Equals(str, other, StringComparison.InvariantCultureIgnoreCase)) let anagrams sources target = let normalizedTarget = normalize target let isMatch str = normalize str = normalizedTarget && unequal str target List.filter isMatch sources
Version data entries
396 entries across 396 versions & 1 rubygems