Created
December 12, 2016 17:50
-
-
Save gardnervickers/4018bd3f8b51f553cf399d5fd2313d5a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let [s (re-seq #"\d+" "401-477-0248")] | |
(println (reduce (fn [acc v] | |
(if (and (seq acc) | |
(every? (fn [pastv] | |
(= pastv ["" nil])) (take-last 10 acc))) | |
(reduced acc) | |
(conj acc v))) [] s))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment