Terminal documentation for Racket.
Racket has excellent Scribble-generated HTML documentation, but (help ...) always opens a web browser. When working on a remote machine
without a browser, this is useless. inline-help provides a (doc ...) macro that renders documentation directly in the REPL terminal
with ANSI formatting.
raco pkg install inline-help
(require inline-help)
(doc map) ; look up any identifier
(doc define) ; works for syntax forms too
(doc string-join) ; finds things beyond racket/base
(doc string-append #:from racket/base) ; look up from a specific moduleExample output:
map [racket]
procedure
(map proc lst ...+) -> list?
proc : procedure?
lst : list?
Applies proc to the elements of the lsts from the first elements to the last.
The proc argument must accept the same number of arguments as the number of
supplied lsts, and all lsts must have the same number of elements. The result is
a list containing each result of proc in order.
TERM— When set todumbor unset, ANSI colors are disabled.COLUMNS— Sets the terminal width for word wrapping (default: 80).
MIT