Skip to content

Instantly share code, notes, and snippets.

@sbenhaim
Created December 12, 2015 03:45
Show Gist options
  • Save sbenhaim/931d9ac473a89c5090de to your computer and use it in GitHub Desktop.
Save sbenhaim/931d9ac473a89c5090de to your computer and use it in GitHub Desktop.
Advent of Code: 5
(let [a5 (slurp "a5.txt")
lines (str/split-lines a5)]
(count (filter (fn [s] (and
(not (re-find #"ab|cd|pq|xy" s))
(re-find #"(.)\1" s)
(>= (count (re-seq #"[aeiou]" s)) 3)))
lines)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment