Skip to content

Instantly share code, notes, and snippets.

@milkypostman
Created May 1, 2011 20:13
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 milkypostman/950820 to your computer and use it in GitHub Desktop.
Save milkypostman/950820 to your computer and use it in GitHub Desktop.
(defn good [n i]
(= 0 (mod i (/ n 10))))
(defn lots [n]
(filter (partial good n) (range n)))
@ihodes
Copy link

ihodes commented May 1, 2011

Should work. # is sugar for an anon fn.

(filter #(zero? (mod % 10)) (range 100)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment