Skip to content

Instantly share code, notes, and snippets.

@avescodes
Created November 14, 2008 03:45
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 avescodes/24770 to your computer and use it in GitHub Desktop.
Save avescodes/24770 to your computer and use it in GitHub Desktop.
(defn count-atoms [L]
(cond
(not (coll? L)) 1
(empty? L) 0
(list? L) (apply + (map count-atoms L))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment