   (let [splitPassphrase (seq (splitWhitespace passphrase))]
     (= splitPassphrase (distinct splitPassphrase))))
 
+(defn anagramPassphrase?
+  "Checks if the passphrase has no unique/anagram words."
+  [passphrase]
+  (let [sortedPassphrase (map sort (seq (splitWhitespace passphrase)))]
+    (= sortedPassphrase (distinct sortedPassphrase))))
+
 (defn trueToNum
   "Translates true to 1 and false to 0."
   [maybeTrue]

  [& args]
  (let [filename (if args (first args) "input")]
    (let [contents (clojure.string/trim (slurp filename))]
      (println (validPassphrases contents)))))


(defn validPassphrases
  "Returns how many passphrases of sequence are valid."
  [sequence checkfn]
  (->> sequence
       (clojure.string/split-lines)
       (map clojure.string/trim)
       (map checkfn)
       (map trueToNum)
       (reduce +)))

