I think Chris mentioned recently there's no short way how to get namespace of a keyword.
Maybe I'm misinterpreting him but if not then there's the the namespace
function:
(namespace :ahoj/key)
;;=> "ahoj"
Sounds like I wasn't totally clear. I was trying to say, there isn't a short way to get a string for a keyword that includes the namespace.
When I want :foo/bar
to become "foo/bar"
.
The best way I've found thus far is:
user=> (subs (str :foo/bar) 1)
"foo/bar"
Because:
user=> (str :foo/bar)
":foo/bar"
(->> :foo/bar ((juxt namespace (constantly \/) name)) (apply str))
because baroque
@jrwdunham That's fun! And yes, baroque. π
BTW, Gene Kim (The Phoenix Project) recommends the podcast: https://itrevolution.com/love-letter-to-clojure-part-1/ (Near the end)
@spfeiffer Thanks for the heads up! That's a great read!
Thanks for the kind words, all! I canβt overstate how fantastic @nate your work has been in helping me understand and better use Clojure β keep up all the amazing work!
@genekim Thank you so much! Hearing that is huge for me!
Oh wow, that's great!
Many many words, I'll have to read it this evening. Thanks for the tip @spfeiffer