documentation - How to see docstrings and other symbol information in Common Lisp REPL? -


i'm new cl, , i'd learn how read documentation strings , other information repl. help(symbol) in python, or symbol? in ipython, or :t , :i in haskell's ghci.

so, given symbol name, i'd able know:

  • what kind of value bound to, if (a function, variable, none @ all)
  • if function or macro, positional arguments
  • if has docstring, show it
  • what package or file coming or when defined

i found there (documentation '_symbol_ '_type_), not need. need know type of value symbol bound ('function, 'variable, 'compiler-macro, etc.) before can use documentation. returns docstring, may missing or not sufficient use symbol.

for example, in lisp, mapcar not useful (clisp's repl):

> (documentation 'mapcar 'function) nil 

i'd able see instead:

>>> map? type:       builtin_function_or_method base class: <type 'builtin_function_or_method'> string form:    <built-in function map> namespace:  python builtin docstring:     map(function, sequence[, sequence, ...]) -> list      return list of results of applying function items of     argument sequence(s).  if more 1 sequence given,     function called argument list consisting of corresponding     item of each sequence, substituting none missing values when not     sequences have same length.  if function none, return list of     items of sequence (or list of tuples if more 1 sequence). 

as mentioned common lisp has standard functions: describe, inspect , documentation. typical lisp ides have these bound keys , menus.

for standard common lisp functionality ides directly link common lisp hyperspec documentation keystroke.

most ides have keystrokes show arglist , documentation. there 'arglist on space' functionality.

lispworks specific examples: lispworks argument list information , lispworks expressions menu

i can recommend read ide manual slime, lispworks, allegro cl, or whatever ide using.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -