Skip to content

Instantly share code, notes, and snippets.

@lnds
Created January 11, 2016 20:34
Show Gist options
  • Select an option

  • Save lnds/f47e8a136053f7b542cd to your computer and use it in GitHub Desktop.

Select an option

Save lnds/f47e8a136053f7b542cd to your computer and use it in GitHub Desktop.
Validar expandido
(defn validar [tam num]
(if (and (every? #(Character/isDigit %) num))
(let [cuenta-unicos (count (distinct num))]
(and
(= tam cuenta-unicos)
(= (count num) cuenta-unicos)))))
(map #(Character/digit % 10) (seq num))
nil))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment