I would like to assemble a string that consists of the docstrings of several functions. Here is essentially what I am trying:
"""the function foo | it's fine"""
foo() = nothing
"""another function bar | it's great"""
bar() = nothing
totaldoc = ""
for f in (foo, bar)
docstring = @doc $f
global totaldoc *= string(docstring)
end
Running exactly the above returns:
julia> println(totaldoc)
No documentation found.
Binding `f` does not exist.
No documentation found.
Binding `f` does not exist.
Running with @eval @doc $f
also does not work
Any ideas on how to get this to work? The reason I am trying this is that for my particular application, it would be very useful to have a function which would list all of the functions available in the module as well as a few words about each one.