Sha256: 1c99751ae99f26388f0f3e2f537aad6c7be18a695154b3c1d69e206c0b0c56be
Contents?: true
Size: 392 Bytes
Versions: 177
Compression:
Stored size: 392 Bytes
Contents
open Core.Std let to_sorted_list s = String.to_list s |> List.sort ~cmp:Char.compare let anagrams target candidates = let target_lc = String.lowercase target in let target_sorted = to_sorted_list target_lc in List.map ~f:(fun c -> (c, String.lowercase c)) candidates |> List.filter ~f:(fun (_, lc) -> to_sorted_list lc = target_sorted && lc <> target_lc) |> List.map ~f:fst
Version data entries
177 entries across 177 versions & 1 rubygems