# Assembling documentation in a loop

**URL:** https://discourse.julialang.org/t/assembling-documentation-in-a-loop/18083
**Category:** General Usage
**Tags:** documentation
**Created:** [November 28, 2018, 12:14am UTC](https://discourse.julialang.org/t/assembling-documentation-in-a-loop/18083 "2018-11-28T00:14:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tomerarnon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomerarnon/32/3170_2.png) [@tomerarnon](https://discourse.julialang.org/u/tomerarnon)
#### Post date: [November 28, 2018, 12:14am UTC](https://discourse.julialang.org/t/assembling-documentation-in-a-loop/18083/1 "2018-11-28T00:14:52Z")

</div>

I would like to assemble a string that consists of the docstrings of several functions. Here is essentially what I am trying:

```julia
"""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
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.
