doc: Display in-body function documentation (a "docstring")

Description Usage Arguments Examples

Description

See https://clojuredocs.org/clojure.repl/doc. The "docstring" is extracted from the comments starting with a double hash character (##).

Usage

1
doc(f)

Arguments

f

A function.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
fff <- function(x = 1) {
    ## This is my function:
    ## argument x, default 1.
    ## returns x + 10.
    x + 10
}
doc(fff)
# displays in the console:

# This is my function:
# argument x, default 1.
# returns x + 10

alekrutkowski/clojR documentation built on May 11, 2019, 11:24 p.m.