Skip to content

Instantly share code, notes, and snippets.

@bellkev
Created November 25, 2013 06:36
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 bellkev/7637204 to your computer and use it in GitHub Desktop.
Save bellkev/7637204 to your computer and use it in GitHub Desktop.
Quick example of converting hyphen-case to CamelCase that happens to work well with thread-last
(defn camel-case
"Idempotently convert hyphen-case to CamelCase"
[name]
(->>(string/split name #"-")
(map string/capitalize)
(string/join "")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment