32 lines
745 B
Markdown
32 lines
745 B
Markdown
|
# Miscellaneous Functions
|
||
|
|
||
|
## `type-of`
|
||
|
```
|
||
|
(type-of value)
|
||
|
```
|
||
|
`type-of` returns an atom indicating the type of `value`, or nil if
|
||
|
`value` is nil.
|
||
|
|
||
|
## `addr-of`
|
||
|
```
|
||
|
(addr-of value)
|
||
|
```
|
||
|
`addr-of` returns the raw immediate value of its argument as an int. For
|
||
|
conses, strings, and funptrs, this is their memory address (hence the
|
||
|
name). For ints, floats, and atoms, this returns their raw bytes
|
||
|
interpreted as a signed 2's-complement integer.
|
||
|
|
||
|
## `set`
|
||
|
```
|
||
|
(set atom value)
|
||
|
```
|
||
|
`set` changes the value associated with `atom` in syms-alist, or creates
|
||
|
the association if it does not already exist. It returns `value`.
|
||
|
|
||
|
## `fun`
|
||
|
```
|
||
|
(fun atom)
|
||
|
```
|
||
|
`fun` returns the function associated with `atom` in funs-alist, or nil
|
||
|
if no such function exists.
|