# How to add docstring to a function on an empty module?

**URL:** <https://discourse.julialang.org/t/how-to-add-docstring-to-a-function-on-an-empty-module/86728>\
**Category:** General Usage\
**Created:** [September 3, 2022, 12:07pm UTC](https://discourse.julialang.org/t/how-to-add-docstring-to-a-function-on-an-empty-module/86728 "2022-09-03T12:07:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![uje](https://avatars.discourse-cdn.com/v4/letter/u/5f9b8f/32.png) [@uje](https://discourse.julialang.org/u/uje)\
**Post date:** [September 3, 2022, 12:07pm UTC](https://discourse.julialang.org/t/how-to-add-docstring-to-a-function-on-an-empty-module/86728/1 "2022-09-03T12:07:57Z")

</div>

How do I add a docstring to the function `add` on this module that does not import `Core` and `Base`?

```julia
julia> Animal = Module(:Animal, false, false)
Main.Animal

julia> @eval Animal add(x, y) = $(+)(x, y)
add (generic function with 1 method)

```

If I was using `baremodule`, I would have done something like this:

```nohighlight
julia> baremodule Animal

       """
       `add(x, y)`

       This function sums up `x` and `y`
       """
       add(x, y) = x + y

       end

```

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [September 3, 2022, 12:50pm UTC](https://discourse.julialang.org/t/how-to-add-docstring-to-a-function-on-an-empty-module/86728/2 "2022-09-03T12:50:47Z")

</div>

```julia
@doc "foo" Animal.add

```
