I have two functions
function foo() end
function bar() end
Is it possible as in R for example to write a single docstring for both functions?
Method 1 Place docstrings directly before or above defined name (s) separate by a comma.
function foo() end
function bar() end
"baz" foo, bar
"baz"
foo, bar
"""
baz
"""
foo, bar
Method 2. Multiple functions can be defined and documented directly.
"baz"
function foo() end, # note the comma
function bar() end
Method 3 Refer to docs by macro.
"baz"
function foo() end
function bar() end
@doc (@doc foo) bar
Further reading
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With