• Shaarli
  • Tag cloud
  • Picture wall
  • Daily
  • RSS
  • Login
4252 shaares
Filters

Calling doc on the value of a variable

QRCode

I'm just starting out with Clojure and I was trying to implement vim's keywordprg, which displays documentation for the word under the cursor. I want to call the doc() function on the value of a variable, but I'm not having any luck:

user=> (let [x "println"] (doc x))
-------------------------
user/x
nil

In Perl, I think I could use the eval() function, but I'm not seeing anything comparable in Clojure. Any suggestions? Thanks!

https://www.reddit.com/r/Clojure/comments/1hbxhum/calling_doc_on_the_value_of_a_variable/
April 3, 2025 at 9:56:06 AM EDT *
clojure reddit
FILLER
Shaarli · The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community · Documentation
Fold Fold all Expand Expand all Are you sure you want to delete this link? Are you sure you want to delete this tag? The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community