Skip to content

var ? as alias for doc #1536

Answered by ianthehenry
badiku asked this question in Q&A
Dec 20, 2024 · 8 comments · 3 replies
Discussion options

You must be logged in to vote

if I understand correctly, macro is like "statement", macro "do something", and function "return something".

That's not really right -- a macro is a way to run code at compile time that returns new code that can run at runtime. Macros can be statement-y or expression-y, or they can just perform compile-time side effects and not return any interesting code to run at runtime.

The thing that you're looking for doesn't really make sense, because doc and doc2 are the same value. They're just different bindings. You can look at the binding of a symbol like this:

repl:1:> (dyn 'doc)
@{:doc "(doc &opt sym)\n\nShows documentation for the given symbol, or can show a list of available bindings.\nI…

Replies: 8 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@sogaiu
Comment options

@sogaiu
Comment options

Comment options

You must be logged in to vote
1 reply
@sogaiu
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by badiku
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants