Skip to content

Instantly share code, notes, and snippets.

@drewr
Created September 30, 2010 14:00
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 drewr/604610 to your computer and use it in GitHub Desktop.
Save drewr/604610 to your computer and use it in GitHub Desktop.
(defmacro join-path [& paths]
`(-> ~@(for [p paths] `(java.io.File. ~p))))
user> (join-path "/foo///" "///bar" "/baz////")
#<File /foo/bar/baz>
user>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment