keithlisp/doc/stdlib_internals.md

38 lines
1008 B
Markdown
Raw Permalink Normal View History

# Keithlisp Internals
These functions allow code to query and interact with the internals of
Keithlisp directly.
**Functions whose names end in `!` are particularly dangerous, and
should be avoided in almost all circumstances. You do not need them.**
## `syms-alist!`
```
(syms-alist!)
```
`syms-alist!` returns a reference to the syms-alist, which holds every
currently defined variable.
## `funs-alist!`
```
(funs-alist!)
```
`funs-alist!` returns a reference to the funs-alist, which holds every
currently defined function.
## `atoms-alist!`
```
(atoms-alist!)
```
`atoms-alist!` returns a reference to the atoms-alist, which stores the
original string of every atom that Keithlisp has parsed. It returns nil
if the atoms-alist has been disabled.
## `fun-set!`
```
(fun-set! name value)
```
`fun-set!` directly modifies the funs-alist, creating a new association
defining `name` as `value`. It returns the entry it has created. This is
more or less the equivalent of `set` for function definitions.