Skip to content

Instantly share code, notes, and snippets.

@JacekLach
Created November 9, 2012 12:56
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 JacekLach/4045544 to your computer and use it in GitHub Desktop.
Save JacekLach/4045544 to your computer and use it in GitHub Desktop.
cast-to-uuid
(defn- uuid
([] (java.util.UUID/randomUUID))
([source] (if (instance? String source)
(java.util.UUID/fromString source)
source)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment