Sha256: a0b728c2d0b1952978d235e7ed09483a48ae4af76cd1e8d26a4214f3f8b74f32

Contents?: true

Size: 258 Bytes

Versions: 396

Compression:

Stored size: 258 Bytes

Contents

(ns anagram
  (:require [clojure.string :refer [lower-case]]))

(defn- anagram? [w c]
  (let [w (lower-case w)
        c (lower-case c)]
    (and (= (sort w) (sort c))
         (not= w c))))

(defn anagrams-for [w coll]
  (filter (partial anagram? w) coll))

Version data entries

396 entries across 396 versions & 1 rubygems

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