How do I add a docstring to the function add
on this module that does not import Core
and Base
?
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:
julia> baremodule Animal
"""
`add(x, y)`
This function sums up `x` and `y`
"""
add(x, y) = x + y
end