Sha256: aff2008a8cc3afd6eacc011ecb531d89033840750f62da6e2adcc483131f4cda

Contents?: true

Size: 301 Bytes

Versions: 63

Compression:

Stored size: 301 Bytes

Contents

{String*} anagrams(String subject, {String*} candidates) {
    value lower = subject.lowercased;
    value chars = sort(lower);
    return candidates.filter((c) {
            value lowerCandidate = c.lowercased;
            return lower!=lowerCandidate && chars == sort(lowerCandidate);
        });
}

Version data entries

63 entries across 63 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/ceylon/exercises/anagram/example/Anagram.ceylon
trackler-2.2.1.179 tracks/ceylon/exercises/anagram/example/Anagram.ceylon
trackler-2.2.1.178 tracks/ceylon/exercises/anagram/example/Anagram.ceylon
trackler-2.2.1.177 tracks/ceylon/exercises/anagram/example/Anagram.ceylon
trackler-2.2.1.176 tracks/ceylon/exercises/anagram/example/Anagram.ceylon
trackler-2.2.1.175 tracks/ceylon/exercises/anagram/example/Anagram.ceylon
trackler-2.2.1.174 tracks/ceylon/exercises/anagram/example/Anagram.ceylon
trackler-2.2.1.173 tracks/ceylon/exercises/anagram/example/Anagram.ceylon
trackler-2.2.1.172 tracks/ceylon/exercises/anagram/example/Anagram.ceylon
trackler-2.2.1.171 tracks/ceylon/exercises/anagram/example/Anagram.ceylon
trackler-2.2.1.170 tracks/ceylon/exercises/anagram/example/Anagram.ceylon
trackler-2.2.1.169 tracks/ceylon/exercises/anagram/example/Anagram.ceylon
trackler-2.2.1.167 tracks/ceylon/exercises/anagram/example/Anagram.ceylon
trackler-2.2.1.166 tracks/ceylon/exercises/anagram/example/Anagram.ceylon
trackler-2.2.1.165 tracks/ceylon/exercises/anagram/example/Anagram.ceylon
trackler-2.2.1.164 tracks/ceylon/exercises/anagram/example/Anagram.ceylon
trackler-2.2.1.163 tracks/ceylon/exercises/anagram/example/Anagram.ceylon
trackler-2.2.1.162 tracks/ceylon/exercises/anagram/example/Anagram.ceylon
trackler-2.2.1.161 tracks/ceylon/exercises/anagram/example/Anagram.ceylon
trackler-2.2.1.160 tracks/ceylon/exercises/anagram/example/Anagram.ceylon