x-lang

← Index

x/doc/doc

Inline documentation system.

doc wraps def or provide for metadata. help for REPL lookup. apropos for search.

doc

Attach documentation metadata to a definition, provide, or bare symbol.

Three forms: (doc (def name val) meta… desc), (doc (provide name syms) meta… desc), (doc name meta… desc)

Meta forms: (param name TYPE desc), (returns TYPE desc), (example expr result), (see name), (note text)

note

Section marker for documentation grouping. No-op at runtime.

Parameters:

help

Look up documentation in the REPL.

(help) shows overview. (help name) shows function, class or module docs; (help Class member) shows one member. (help modules) lists all modules.

A name is a bare symbol as written, or an expression that evaluates to one, such as ‘name. Anything else answers “No documentation”. A class listing leaves out members whose names begin with %; (help Class %member) still answers for one by name.

apropos

Search documentation by name substring, printing each match with its description.

Parameters:

Returns: LIST — The matching names, as symbols, sorted by name; () when nothing matches

modules

List all known modules with load status and descriptions.