Skip to content

Instantly share code, notes, and snippets.

@jackdempsey
Created December 31, 2011 08:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jackdempsey/1543423 to your computer and use it in GitHub Desktop.
Save jackdempsey/1543423 to your computer and use it in GitHub Desktop.
(defn divisible-by-3-or-5? [num] (or (== (mod num 3) 0)(== (mod num 5) 0)))
#'user/divisible-by-3-or-5?
user=> (take-while divisible-by-3-or-5? [7 9 13 5 8 3 1])
()
user=> (take-while odd? [7 9 13 5 8 3 1])
(7 9 13 5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment