
acons
@c snarfed from alist.c:39
@deffn {Scheme Procedure} acons key value alist
Add a new key-value pair to @var{alist}.  A new pair is
created whose car is @var{key} and whose cdr is @var{value}, and the
pair is consed onto @var{alist}, and the new list is returned.  This
function is @emph{not} destructive; @var{alist} is not modified.
@end deffn

sloppy-assq
@c snarfed from alist.c:53
@deffn {Scheme Procedure} sloppy-assq key alist
Behaves like @code{assq} but does not do any error checking.
Recommended only for use in Guile internals.
@end deffn

sloppy-assv
@c snarfed from alist.c:71
@deffn {Scheme Procedure} sloppy-assv key alist
Behaves like @code{assv} but does not do any error checking.
Recommended only for use in Guile internals.
@end deffn

sloppy-assoc
@c snarfed from alist.c:94
@deffn {Scheme Procedure} sloppy-assoc key alist
Behaves like @code{assoc} but does not do any error checking.
Recommended only for use in Guile internals.
@end deffn

assq
@c snarfed from alist.c:118
@deffn {Scheme Procedure} assq key alist
@deffnx {Scheme Procedure} assv key alist
@deffnx {Scheme Procedure} assoc key alist
Fetch the entry in @var{alist} that is associated with @var{key}.  To
decide whether the argument @var{key} matches a particular entry in
@var{alist}, @code{assq} compares keys with @code{eq?}, @code{assv}
uses @code{eqv?} and @code{assoc} uses @code{equal?}.  If @var{key}
cannot be found in @var{alist} (according to whichever equality
predicate is in use), then return @code{#f}.  These functions
return the entire alist entry found (i.e. both the key and the value).
@end deffn

assv
@c snarfed from alist.c:147
@deffn {Scheme Procedure} assv key alist
Behaves like @code{assq} but uses @code{eqv?} for key comparison.
@end deffn

assoc
@c snarfed from alist.c:174
@deffn {Scheme Procedure} assoc key alist
Behaves like @code{assq} but uses @code{equal?} for key comparison.
@end deffn

assq-ref
@c snarfed from alist.c:214
@deffn {Scheme Procedure} assq-ref alist key
@deffnx {Scheme Procedure} assv-ref alist key
@deffnx {Scheme Procedure} assoc-ref alist key
Like @code{assq}, @code{assv} and @code{assoc}, except that only the
value associated with @var{key} in @var{alist} is returned.  These
functions are equivalent to

@lisp
(let ((ent (@var{associator} @var{key} @var{alist})))
  (and ent (cdr ent)))
@end lisp

where @var{associator} is one of @code{assq}, @code{assv} or @code{assoc}.
@end deffn

assv-ref
@c snarfed from alist.c:240
@deffn {Scheme Procedure} assv-ref alist key
Behaves like @code{assq-ref} but uses @code{eqv?} for key comparison.
@end deffn

assoc-ref
@c snarfed from alist.c:257
@deffn {Scheme Procedure} assoc-ref alist key
Behaves like @code{assq-ref} but uses @code{equal?} for key comparison.
@end deffn

assq-set!
@c snarfed from alist.c:278
@deffn {Scheme Procedure} assq-set! alist key val
@deffnx {Scheme Procedure} assv-set! alist key value
@deffnx {Scheme Procedure} assoc-set! alist key value
Reassociate @var{key} in @var{alist} with @var{val}: find any existing
@var{alist} entry for @var{key} and associate it with the new
@var{val}.  If @var{alist} does not contain an entry for @var{key},
add a new one.  Return the (possibly new) alist.

These functions do not attempt to verify the structure of @var{alist},
and so may cause unusual results if passed an object that is not an
association list.
@end deffn

assv-set!
@c snarfed from alist.c:304
@deffn {Scheme Procedure} assv-set! alist key val
Behaves like @code{assq-set!} but uses @code{eqv?} for key comparison.
@end deffn

assoc-set!
@c snarfed from alist.c:322
@deffn {Scheme Procedure} assoc-set! alist key val
Behaves like @code{assq-set!} but uses @code{equal?} for key comparison.
@end deffn

assq-remove!
@c snarfed from alist.c:343
@deffn {Scheme Procedure} assq-remove! alist key
@deffnx {Scheme Procedure} assv-remove! alist key
@deffnx {Scheme Procedure} assoc-remove! alist key
Delete the first entry in @var{alist} associated with @var{key}, and return
the resulting alist.
@end deffn

assv-remove!
@c snarfed from alist.c:362
@deffn {Scheme Procedure} assv-remove! alist key
Behaves like @code{assq-remove!} but uses @code{eqv?} for key comparison.
@end deffn

assoc-remove!
@c snarfed from alist.c:378
@deffn {Scheme Procedure} assoc-remove! alist key
Behaves like @code{assq-remove!} but uses @code{equal?} for key comparison.
@end deffn

array-fill!
@c snarfed from array-map.c:240
@deffn {Scheme Procedure} array-fill! ra fill
Store @var{fill} in every element of array @var{ra}.  The value
returned is unspecified.
@end deffn

array-copy-in-order!
@c snarfed from array-map.c:289
@deffn {Scheme Procedure} array-copy-in-order!
implemented by the C function "scm_array_copy_x"
@end deffn

array-copy!
@c snarfed from array-map.c:292
@deffn {Scheme Procedure} array-copy! src dst
@deffnx {Scheme Procedure} array-copy-in-order! src dst
Copy every element from vector or array @var{src} to the
corresponding element of @var{dst}.  @var{dst} must have the
same rank as @var{src}, and be at least as large in each
dimension.  The order is unspecified.
@end deffn

array-map-in-order!
@c snarfed from array-map.c:384
@deffn {Scheme Procedure} array-map-in-order!
implemented by the C function "scm_array_map_x"
@end deffn

array-map!
@c snarfed from array-map.c:388
@deffn {Scheme Procedure} array-map! ra0 proc . lra
@deffnx {Scheme Procedure} array-map-in-order! ra0 proc . lra
@var{array1}, @dots{} must have the same number of dimensions
as @var{ra0} and have a range for each index which includes the
range for the corresponding index in @var{ra0}.  @var{proc} is
applied to each tuple of elements of @var{array1}, @dots{} and
the result is stored as the corresponding element in @var{ra0}.
The value returned is unspecified.  The order of application is
unspecified.
@end deffn

array-for-each
@c snarfed from array-map.c:455
@deffn {Scheme Procedure} array-for-each proc ra0 . lra
Apply @var{proc} to each tuple of elements of @var{ra0} @dots{}
in row-major order.  The value returned is unspecified.
@end deffn

array-index-map!
@c snarfed from array-map.c:536
@deffn {Scheme Procedure} array-index-map! ra proc
Apply @var{proc} to the indices of each element of @var{ra} in
turn, storing the result in the corresponding element.  The value
returned and the order of application are unspecified.

One can implement @var{array-indexes} as
@lisp
(define (array-indexes array)
    (let ((ra (apply make-array #f (array-shape array))))
      (array-index-map! ra (lambda x x))
      ra))
@end lisp
Another example:
@lisp
(define (apl:index-generator n)
    (let ((v (make-uniform-vector n 1)))
      (array-index-map! v (lambda (i) i))
      v))
@end lisp
@end deffn

array-equal?
@c snarfed from array-map.c:641
@deffn {Scheme Procedure} array-equal? [ra0 [ra1 . rest]]
Return @code{#t} iff all arguments are arrays with the same
shape, the same type, and have corresponding elements which are
either @code{equal?}  or @code{array-equal?}.  This function
differs from @code{equal?} in that all arguments must be arrays.
@end deffn

array-slice-for-each
@c snarfed from array-map.c:680
@deffn {Scheme Procedure} array-slice-for-each frame_rank op . args
Apply @var{op} to each of the cells of rank rank(@var{arg})-@var{frame_rank}
of the arrays @var{args}, in unspecified order. The first
@var{frame_rank} dimensions of each @var{arg} must match.
Rank-0 cells are passed as rank-0 arrays.

The value returned is unspecified.

For example:
@lisp
;; Sort the rows of rank-2 array A.

(array-slice-for-each 1 (lambda (x) (sort! x <)) a)

;; Compute the arguments of the (x y) vectors in the rows of rank-2
;; array XYS and store them in rank-1 array ANGLES. Inside OP,
;; XY is a rank-1 (2-1) array, and ANGLE is a rank-0 (1-1) array.

(array-slice-for-each 1 
  (lambda (xy angle)
    (array-set! angle (atan (array-ref xy 1) (array-ref xy 0))))
  xys angles)
@end lisp
@end deffn

array-slice-for-each-in-order
@c snarfed from array-map.c:905
@deffn {Scheme Procedure} array-slice-for-each-in-order frank op . a
Same as array-slice-for-each, but visit the cells sequentially
and in row-major order.

@end deffn

array?
@c snarfed from arrays.c:83
@deffn {Scheme Procedure} array? obj
Return @code{#t} if the @var{obj} is an array, and @code{#f} if
not.
@end deffn

typed-array?
@c snarfed from arrays.c:119
@deffn {Scheme Procedure} typed-array? obj type
Return @code{#t} if the @var{obj} is an array of type
@var{type}, and @code{#f} if not.
@end deffn

array-length
@c snarfed from arrays.c:148
@deffn {Scheme Procedure} array-length array
Return the length of an array: its first dimension.
It is an error to ask for the length of an array of rank 0.
@end deffn

array-dimensions
@c snarfed from arrays.c:159
@deffn {Scheme Procedure} array-dimensions ra
@code{array-dimensions} is similar to @code{array-shape} but replaces
elements with a @code{0} minimum with one greater than the maximum. So:
@lisp
(array-dimensions (make-array 'foo '(-1 3) 5)) @result{} ((-1 3) 5)
@end lisp
@end deffn

array-type
@c snarfed from arrays.c:190
@deffn {Scheme Procedure} array-type ra

@end deffn

array-type-code
@c snarfed from arrays.c:206
@deffn {Scheme Procedure} array-type-code array
Return the type of the elements in @var{array},
as an integer code.
@end deffn

array-in-bounds?
@c snarfed from arrays.c:224
@deffn {Scheme Procedure} array-in-bounds? ra . args
Return @code{#t} if its arguments would be acceptable to
@code{array-ref}.
@end deffn

array-ref
@c snarfed from arrays.c:341
@deffn {Scheme Procedure} array-ref v [idx0 [idx1 . idxN]]
Return the element at the @code{(idx0, idx1, idxN...)}
position in array @var{v}.
@end deffn

array-set!
@c snarfed from arrays.c:358
@deffn {Scheme Procedure} array-set! v obj [idx0 [idx1 . idxN]]
Set the element at the @code{(idx0, idx1, idxN...)} position
in the array @var{v} to @var{obj}.  The value returned by
@code{array-set!} is unspecified.
@end deffn

array->list
@c snarfed from arrays.c:400
@deffn {Scheme Procedure} array->list array
Return a list representation of @var{array}.

It is easiest to specify the behavior of this function by
example:
@example
(array->list #0(a)) @result{} 1
(array->list #1(a b)) @result{} (a b)
(array->list #2((aa ab) (ba bb)) @result{} ((aa ab) (ba bb))
@end example

@end deffn

array-rank
@c snarfed from arrays.c:434
@deffn {Scheme Procedure} array-rank array
Return the number of dimensions of the array @var{array.}

@end deffn

shared-array-root
@c snarfed from arrays.c:444
@deffn {Scheme Procedure} shared-array-root ra
Return the root vector of a shared array.
@end deffn

shared-array-offset
@c snarfed from arrays.c:459
@deffn {Scheme Procedure} shared-array-offset ra
Return the root vector index of the first element in the array.
@end deffn

shared-array-increments
@c snarfed from arrays.c:474
@deffn {Scheme Procedure} shared-array-increments ra
For each dimension, return the distance between elements in the root vector.
@end deffn

make-typed-array
@c snarfed from arrays.c:553
@deffn {Scheme Procedure} make-typed-array type fill . bounds
Create and return an array of type @var{type}.
@end deffn

make-array
@c snarfed from arrays.c:587
@deffn {Scheme Procedure} make-array fill . bounds
Create and return an array.
@end deffn

make-shared-array
@c snarfed from arrays.c:597
@deffn {Scheme Procedure} make-shared-array oldra mapfunc . dims
@code{make-shared-array} can be used to create shared subarrays
of other arrays.  The @var{mapfunc} is a function that
translates coordinates in the new array into coordinates in the
old array.  A @var{mapfunc} must be linear, and its range must
stay within the bounds of the old array, but it can be
otherwise arbitrary.  A simple example:
@lisp
(define fred (make-array #f 8 8))
(define freds-diagonal
  (make-shared-array fred (lambda (i) (list i i)) 8))
(array-set! freds-diagonal 'foo 3)
(array-ref fred 3 3) @result{} foo
(define freds-center
  (make-shared-array fred (lambda (i j) (list (+ 3 i) (+ 3 j))) 2 2))
(array-ref freds-center 0 0) @result{} foo
@end lisp
@end deffn

array-slice
@c snarfed from arrays.c:749
@deffn {Scheme Procedure} array-slice ra . indices
Return the array slice @var{ra}[@var{indices} ..., ...]
The rank of @var{ra} must equal to the number of indices or larger.

See also @code{array-ref}, @code{array-cell-ref}, @code{array-cell-set!}.

@code{array-slice} may return a rank-0 array. For example:
@lisp
(array-slice #2((1 2 3) (4 5 6)) 1 1) @result{} #0(5)
(array-slice #2((1 2 3) (4 5 6)) 1) @result{} #(4 5 6)
(array-slice #2((1 2 3) (4 5 6))) @result{} #2((1 2 3) (4 5 6))
(array-slice #0(5) @result{} #0(5).
@end lisp
@end deffn

array-cell-ref
@c snarfed from arrays.c:787
@deffn {Scheme Procedure} array-cell-ref ra . indices
Return the element at the @code{(@var{indices} ...)} position
in array @var{ra}, or the array slice @var{ra}[@var{indices} ..., ...]
if the rank of @var{ra} is larger than the number of indices.

See also @code{array-ref}, @code{array-slice}, @code{array-cell-set!}.

@code{array-cell-ref} never returns a rank 0 array. For example:
@lisp
(array-cell-ref #2((1 2 3) (4 5 6)) 1 1) @result{} 5
(array-cell-ref #2((1 2 3) (4 5 6)) 1) @result{} #(4 5 6)
(array-cell-ref #2((1 2 3) (4 5 6))) @result{} #2((1 2 3) (4 5 6))
(array-cell-ref #0(5) @result{} 5.
@end lisp
@end deffn

array-cell-set!
@c snarfed from arrays.c:829
@deffn {Scheme Procedure} array-cell-set! ra b . indices
Set the array slice @var{ra}[@var{indices} ..., ...] to @var{b}
.Equivalent to @code{(array-copy! @var{b} (apply array-cell-ref @var{ra} @var{indices}))}
if the number of indices is smaller than the rank of @var{ra}; otherwise
equivalent to @code{(apply array-set! @var{ra} @var{b} @var{indices})}.
This function returns the modified array @var{ra}.

See also @code{array-ref}, @code{array-cell-ref}, @code{array-slice}.

For example:
@lisp
(define A (list->array 2 '((1 2 3) (4 5 6))))
(array-cell-set! A #0(99) 1 1) @result{} #2((1 2 3) (4 #0(99) 6))
(array-cell-set! A 99 1 1) @result{} #2((1 2 3) (4 99 6))
(array-cell-set! A #(a b c) 0) @result{} #2((a b c) (4 99 6))
(array-cell-set! A #2((x y z) (9 8 7))) @result{} #2((x y z) (9 8 7))

(define B (make-array 0))
(array-cell-set! B 15) @result{} #0(15)
@end lisp
@end deffn

transpose-array
@c snarfed from arrays.c:887
@deffn {Scheme Procedure} transpose-array ra . args
Return an array sharing contents with @var{ra}, but with
dimensions arranged in a different order.  There must be one
@var{dim} argument for each dimension of @var{ra}.
@var{dim0}, @var{dim1}, @dots{} should be integers between 0
and the rank of the array to be returned.  Each integer in that
range must appear at least once in the argument list.

The values of @var{dim0}, @var{dim1}, @dots{} correspond to
dimensions in the array to be returned, their positions in the
argument list to dimensions of @var{ra}.  Several @var{dim}s
may have the same value, in which case the returned array will
have smaller rank than @var{ra}.

@lisp
(transpose-array '#2((a b) (c d)) 1 0) @result{} #2((a c) (b d))
(transpose-array '#2((a b) (c d)) 0 0) @result{} #1(a d)
(transpose-array '#3(((a b c) (d e f)) ((1 2 3) (4 5 6))) 1 1 0) @result{}
                #2((a 4) (b 5) (c 6))
@end lisp
@end deffn

array-contents
@c snarfed from arrays.c:988
@deffn {Scheme Procedure} array-contents ra [strict]
If @var{ra} may be @dfn{unrolled} into a one dimensional shared
array without changing their order (last subscript changing
fastest), then @code{array-contents} returns that shared array,
otherwise it returns @code{#f}.  All arrays made by
@code{make-array} and @code{make-uniform-array} may be unrolled,
some arrays made by @code{make-shared-array} may not be.  If
the optional argument @var{strict} is provided, a shared array
will be returned only if its elements are stored contiguously
in memory.
@end deffn

list->typed-array
@c snarfed from arrays.c:1084
@deffn {Scheme Procedure} list->typed-array type shape lst
Return an array of the type @var{type}
with elements the same as those of @var{lst}.

The argument @var{shape} determines the number of dimensions
of the array and their shape.  It is either an exact integer,
giving the
number of dimensions directly, or a list whose length
specifies the number of dimensions and each element specified
the lower and optionally the upper bound of the corresponding
dimension.
When the element is list of two elements, these elements
give the lower and upper bounds.  When it is an exact
integer, it gives only the lower bound.
@end deffn

list->array
@c snarfed from arrays.c:1154
@deffn {Scheme Procedure} list->array ndim lst
Return an array with elements the same as those of @var{lst}.
@end deffn

system-async-mark
@c snarfed from async.c:238
@deffn {Scheme Procedure} system-async-mark proc [thread]
Mark @var{proc} (a procedure with zero arguments) for future execution
in @var{thread}.  If @var{proc} has already been marked for
@var{thread} but has not been executed yet, this call has no effect.
If @var{thread} is omitted, the thread that called
@code{system-async-mark} is used.

This procedure is not safe to be called from C signal handlers.  Use
@code{scm_sigaction} or @code{scm_sigaction_for_thread} to install
signal handlers.
@end deffn

noop
@c snarfed from async.c:312
@deffn {Scheme Procedure} noop . args
Do nothing.  When called without arguments, return @code{#f},
otherwise return the first argument.
@end deffn

call-with-blocked-asyncs
@c snarfed from async.c:360
@deffn {Scheme Procedure} call-with-blocked-asyncs proc
Call @var{proc} with no arguments and block the execution
of system asyncs by one level for the current thread while
it is running.  Return the value returned by @var{proc}.

@end deffn

call-with-unblocked-asyncs
@c snarfed from async.c:392
@deffn {Scheme Procedure} call-with-unblocked-asyncs proc
Call @var{proc} with no arguments and unblock the execution
of system asyncs by one level for the current thread while
it is running.  Return the value returned by @var{proc}.

@end deffn

make-atomic-box
@c snarfed from atomic.c:39
@deffn {Scheme Procedure} make-atomic-box init
Return an atomic box initialized to value @var{init}.
@end deffn

atomic-box?
@c snarfed from atomic.c:50
@deffn {Scheme Procedure} atomic-box? obj
Return @code{#t} if @var{obj} is an atomic-box object, else
return @code{#f}.
@end deffn

atomic-box-ref
@c snarfed from atomic.c:60
@deffn {Scheme Procedure} atomic-box-ref box
Fetch the value stored in the atomic box @var{box} and
return it.
@end deffn

atomic-box-set!
@c snarfed from atomic.c:71
@deffn {Scheme Procedure} atomic-box-set! box val
Store @var{val} into the atomic box @var{box}.
@end deffn

atomic-box-swap!
@c snarfed from atomic.c:82
@deffn {Scheme Procedure} atomic-box-swap! box val
Store @var{val} into the atomic box @var{box},
and return the value that was previously stored in
the box.
@end deffn

atomic-box-compare-and-swap!
@c snarfed from atomic.c:94
@deffn {Scheme Procedure} atomic-box-compare-and-swap! box expected desired
If the value of the atomic box @var{box} is the same as,
@var{expected} (in the sense of @code{eq?}), replace the
contents of the box with @var{desired}.  Otherwise does not
update the box.  Returns the previous value of the box in
either case, so you can know if the swap worked by checking
if the return value is @code{eq?} to @var{expected}.
@end deffn

display-error
@c snarfed from backtrace.c:168
@deffn {Scheme Procedure} display-error frame port subr message args rest
Display an error message to the output port @var{port}.
@var{frame} is the frame in which the error occurred, @var{subr} is
the name of the procedure in which the error occurred and
@var{message} is the actual error message, which may contain
formatting instructions. These will format the arguments in
the list @var{args} accordingly.  @var{rest} is currently
ignored.
@end deffn

display-application
@c snarfed from backtrace.c:187
@deffn {Scheme Procedure} display-application frame [port [indent]]
Display a procedure application @var{frame} to the output port
@var{port}. @var{indent} specifies the indentation of the
output.
@end deffn

display-backtrace
@c snarfed from backtrace.c:258
@deffn {Scheme Procedure} display-backtrace stack port [first [depth [highlights]]]
Display a backtrace to the output port @var{port}.  @var{stack}
is the stack to take the backtrace from, @var{first} specifies
where in the stack to start and @var{depth} how many frames
to display.  @var{first} and @var{depth} can be @code{#f},
which means that default values will be used.
If @var{highlights} is given it should be a list; the elements
of this list will be highlighted wherever they appear in the
backtrace.
@end deffn

backtrace
@c snarfed from backtrace.c:294
@deffn {Scheme Procedure} backtrace [highlights]
Display a backtrace of the current stack to the current
output port.  If @var{highlights} is given, it should be
a list; the elements of this list will be highlighted
wherever they appear in the backtrace.
@end deffn

not
@c snarfed from boolean.c:57
@deffn {Scheme Procedure} not x
Return @code{#t} iff @var{x} is false, else return @code{#f}.
@end deffn

nil?
@c snarfed from boolean.c:66
@deffn {Scheme Procedure} nil? x
Return @code{#t} if @var{x} would be interpreted as @code{nil}
by Emacs Lisp code, else return @code{#f}.

@example
(nil? #nil) @result{} #t
(nil? #f)   @result{} #t
(nil? '())  @result{} #t
(nil? 3)    @result{} #f
@end example
@end deffn

boolean?
@c snarfed from boolean.c:83
@deffn {Scheme Procedure} boolean? obj
Return @code{#t} iff @var{obj} is @code{#t} or false.
@end deffn

bitvector?
@c snarfed from bitvectors.c:131
@deffn {Scheme Procedure} bitvector? obj
Return @code{#t} when @var{obj} is a bitvector, else
return @code{#f}.
@end deffn

make-bitvector
@c snarfed from bitvectors.c:160
@deffn {Scheme Procedure} make-bitvector len [fill]
Create a new bitvector of length @var{len} and
optionally initialize all elements to @var{fill}.
@end deffn

bitvector
@c snarfed from bitvectors.c:170
@deffn {Scheme Procedure} bitvector . bits
Create a new bitvector with the arguments as elements.
@end deffn

bitvector-length
@c snarfed from bitvectors.c:187
@deffn {Scheme Procedure} bitvector-length vec
Return the length of the bitvector @var{vec}.
@end deffn

bitvector-bit-set?
@c snarfed from bitvectors.c:276
@deffn {Scheme Procedure} bitvector-bit-set? vec idx
Return @code{#t} if the bit at index @var{idx} of the 
bitvector @var{vec} is set, or @code{#f} otherwise.
@end deffn

bitvector-bit-clear?
@c snarfed from bitvectors.c:286
@deffn {Scheme Procedure} bitvector-bit-clear? vec idx
Return @code{#t} if the bit at index @var{idx} of the 
bitvector @var{vec} is clear (unset), or @code{#f} otherwise.
@end deffn

bitvector-set-bit!
@c snarfed from bitvectors.c:325
@deffn {Scheme Procedure} bitvector-set-bit! vec idx
Set the element at index @var{idx} of the bitvector
@var{vec}.
@end deffn

bitvector-clear-bit!
@c snarfed from bitvectors.c:336
@deffn {Scheme Procedure} bitvector-clear-bit! vec idx
Clear the element at index @var{idx} of the bitvector
@var{vec}.
@end deffn

bitvector-set-all-bits!
@c snarfed from bitvectors.c:385
@deffn {Scheme Procedure} bitvector-set-all-bits! vec
Set all elements of the bitvector @var{vec}.
@end deffn

bitvector-clear-all-bits!
@c snarfed from bitvectors.c:393
@deffn {Scheme Procedure} bitvector-clear-all-bits! vec
Clear all elements of the bitvector @var{vec}.
@end deffn

list->bitvector
@c snarfed from bitvectors.c:401
@deffn {Scheme Procedure} list->bitvector list
Return a new bitvector initialized with the elements
of @var{list}.
@end deffn

bitvector->list
@c snarfed from bitvectors.c:427
@deffn {Scheme Procedure} bitvector->list vec
Return a new list initialized with the elements
of the bitvector @var{vec}.
@end deffn

bitvector-count
@c snarfed from bitvectors.c:519
@deffn {Scheme Procedure} bitvector-count bitvector
Return the number of set bits in @var{bitvector}.
@end deffn

bitvector-position
@c snarfed from bitvectors.c:548
@deffn {Scheme Procedure} bitvector-position v bit [start]
Return the index of the first occurrence of @var{bit} in bit
vector @var{v}, starting from @var{start} (or zero if not given)
.If there is no @var{bit} entry between @var{start} and the end of
@var{v}, then return @code{#f}.  For example,

@example
(bitvector-position #*000101 #t)  @result{} 3
(bitvector-position #*0001111 #f 3) @result{} #f
@end example
@end deffn

bitvector-set-bits!
@c snarfed from bitvectors.c:650
@deffn {Scheme Procedure} bitvector-set-bits! v bits
Update the bitvector @var{v} in place by performing a
logical OR of its bits with those of @var{bits}.
For example:

@example
(define bv (bitvector-copy #*11000010))
(bitvector-set-bits! bv #*10010001)
bv
@result{} #*11010011
@end example
@end deffn

bitvector-clear-bits!
@c snarfed from bitvectors.c:669
@deffn {Scheme Procedure} bitvector-clear-bits! v bits
Update the bitvector @var{v} in place by performing a
logical AND of its bits with the complement of those of
@var{bits}.  For example:

@example
(define bv (bitvector-copy #*11000010))
(bitvector-clear-bits! bv #*10010001)
bv
@result{} #*01000010
@end example
@end deffn

bitvector-copy
@c snarfed from bitvectors.c:688
@deffn {Scheme Procedure} bitvector-copy bv [start [end]]
Returns a freshly allocated bitvector containing the elements
of bitvector @var{bv} between @var{start} and @var{end}.

@var{start} defaults to 0 and @var{end} defaults to the
length of @var{bv}.
@end deffn

bitvector-count-bits
@c snarfed from bitvectors.c:763
@deffn {Scheme Procedure} bitvector-count-bits v kv
Return a count of how many entries in bit vector @var{v}
are set, with @var{kv} selecting the entries to consider.

For example,

@example
(bitvector-count-bits #*01110111 #*11001101) @result{} 3
@end example
@end deffn

bitvector-flip-all-bits!
@c snarfed from bitvectors.c:797
@deffn {Scheme Procedure} bitvector-flip-all-bits! v
Modify the bit vector @var{v} in place by setting all
clear bits and clearing all set bits.
@end deffn

bytevector-slice
@c snarfed from bytevectors.c:329
@deffn {Scheme Procedure} bytevector-slice bv offset [size]
Return the slice of @var{bv} starting at @var{offset} and counting
@var{size} bytes.  When @var{size} is omitted, the slice covers all
of @var{bv} starting from @var{offset}.  The returned slice shares
storage with @var{bv}: changes to the slice are visible in @var{bv}
and vice-versa.

When @var{bv} is actually a SRFI-4 uniform vector, its element
type is preserved unless @var{offset} and @var{size} are not aligned
on its element type size.

@end deffn

native-endianness
@c snarfed from bytevectors.c:534
@deffn {Scheme Procedure} native-endianness
Return a symbol denoting the machine's native endianness.
@end deffn

bytevector?
@c snarfed from bytevectors.c:543
@deffn {Scheme Procedure} bytevector? obj
Return true if @var{obj} is a bytevector.
@end deffn

make-bytevector
@c snarfed from bytevectors.c:552
@deffn {Scheme Procedure} make-bytevector len [fill]
Return a newly allocated bytevector of @var{len} bytes, optionally filled with @var{fill}.
@end deffn

bytevector-length
@c snarfed from bytevectors.c:590
@deffn {Scheme Procedure} bytevector-length bv
Return the length (in bytes) of @var{bv}.
@end deffn

bytevector=?
@c snarfed from bytevectors.c:599
@deffn {Scheme Procedure} bytevector=? bv1 bv2
Return is @var{bv1} equals to @var{bv2}---i.e., if they have the same length and contents.
@end deffn

bytevector-fill!
@c snarfed from bytevectors.c:631
@deffn {Scheme Procedure} bytevector-fill! bv fill [start [end]]
Fill positions [@var{start} ... @var{end}) of bytevector @var{bv} with @var{fill}, a byte. @var{start} defaults to 0 and @var{end} defaults to the length of @var{bv}. The return value is unspecified.
@end deffn

bytevector-copy!
@c snarfed from bytevectors.c:669
@deffn {Scheme Procedure} bytevector-copy! source source_start target target_start len
Copy @var{len} bytes from @var{source} into @var{target}, reading from a block starting at @var{source_start} (a positive index within @var{source}) and writing to a block starting at @var{target_start}.

It is permitted for the @var{source} and @var{target} regions to overlap. In that case, copying takes place as if the source is first copied into a temporary bytevector and then into the destination. 
@end deffn

bytevector-copy
@c snarfed from bytevectors.c:713
@deffn {Scheme Procedure} bytevector-copy bv
Return a newly allocated copy of @var{bv}.
@end deffn

uniform-array->bytevector
@c snarfed from bytevectors.c:735
@deffn {Scheme Procedure} uniform-array->bytevector array
Return a newly allocated bytevector whose contents
will be copied from the uniform array @var{array}.
@end deffn

bytevector-u8-ref
@c snarfed from bytevectors.c:782
@deffn {Scheme Procedure} bytevector-u8-ref bv index
Return the octet located at @var{index} in @var{bv}.
@end deffn

bytevector-s8-ref
@c snarfed from bytevectors.c:791
@deffn {Scheme Procedure} bytevector-s8-ref bv index
Return the byte located at @var{index} in @var{bv}.
@end deffn

bytevector-u8-set!
@c snarfed from bytevectors.c:800
@deffn {Scheme Procedure} bytevector-u8-set! bv index value
Return the octet located at @var{index} in @var{bv}.
@end deffn

bytevector-s8-set!
@c snarfed from bytevectors.c:809
@deffn {Scheme Procedure} bytevector-s8-set! bv index value
Return the octet located at @var{index} in @var{bv}.
@end deffn

bytevector->u8-list
@c snarfed from bytevectors.c:819
@deffn {Scheme Procedure} bytevector->u8-list bv
Return a newly allocated list of octets containing the contents of @var{bv}.
@end deffn

u8-list->bytevector
@c snarfed from bytevectors.c:846
@deffn {Scheme Procedure} u8-list->bytevector lst
Turn @var{lst}, a list of octets, into a bytevector.
@end deffn

bytevector-uint-ref
@c snarfed from bytevectors.c:1171
@deffn {Scheme Procedure} bytevector-uint-ref bv index endianness size
Return the @var{size}-octet long unsigned integer at index @var{index} in @var{bv}.
@end deffn

bytevector-sint-ref
@c snarfed from bytevectors.c:1183
@deffn {Scheme Procedure} bytevector-sint-ref bv index endianness size
Return the @var{size}-octet long unsigned integer at index @var{index} in @var{bv}.
@end deffn

bytevector-uint-set!
@c snarfed from bytevectors.c:1195
@deffn {Scheme Procedure} bytevector-uint-set! bv index value endianness size
Set the @var{size}-octet long unsigned integer at @var{index} to @var{value}.
@end deffn

bytevector-sint-set!
@c snarfed from bytevectors.c:1210
@deffn {Scheme Procedure} bytevector-sint-set! bv index value endianness size
Set the @var{size}-octet long signed integer at @var{index} to @var{value}.
@end deffn

bytevector->sint-list
@c snarfed from bytevectors.c:1264
@deffn {Scheme Procedure} bytevector->sint-list bv endianness size
Return a list of signed integers of @var{size} octets representing the contents of @var{bv}.
@end deffn

bytevector->uint-list
@c snarfed from bytevectors.c:1275
@deffn {Scheme Procedure} bytevector->uint-list bv endianness size
Return a list of unsigned integers of @var{size} octets representing the contents of @var{bv}.
@end deffn

uint-list->bytevector
@c snarfed from bytevectors.c:1317
@deffn {Scheme Procedure} uint-list->bytevector lst endianness size
Return a bytevector containing the unsigned integers listed in @var{lst} and encoded on @var{size} octets according to @var{endianness}.
@end deffn

sint-list->bytevector
@c snarfed from bytevectors.c:1329
@deffn {Scheme Procedure} sint-list->bytevector lst endianness size
Return a bytevector containing the signed integers listed in @var{lst} and encoded on @var{size} octets according to @var{endianness}.
@end deffn

bytevector-u16-ref
@c snarfed from bytevectors.c:1347
@deffn {Scheme Procedure} bytevector-u16-ref bv index endianness
Return the unsigned 16-bit integer from @var{bv} at @var{index}.
@end deffn

bytevector-s16-ref
@c snarfed from bytevectors.c:1358
@deffn {Scheme Procedure} bytevector-s16-ref bv index endianness
Return the signed 16-bit integer from @var{bv} at @var{index}.
@end deffn

bytevector-u16-native-ref
@c snarfed from bytevectors.c:1369
@deffn {Scheme Procedure} bytevector-u16-native-ref bv index
Return the unsigned 16-bit integer from @var{bv} at @var{index} using the native endianness.
@end deffn

bytevector-s16-native-ref
@c snarfed from bytevectors.c:1380
@deffn {Scheme Procedure} bytevector-s16-native-ref bv index
Return the unsigned 16-bit integer from @var{bv} at @var{index} using the native endianness.
@end deffn

bytevector-u16-set!
@c snarfed from bytevectors.c:1391
@deffn {Scheme Procedure} bytevector-u16-set! bv index value endianness
Store @var{value} in @var{bv} at @var{index} according to @var{endianness}.
@end deffn

bytevector-s16-set!
@c snarfed from bytevectors.c:1402
@deffn {Scheme Procedure} bytevector-s16-set! bv index value endianness
Store @var{value} in @var{bv} at @var{index} according to @var{endianness}.
@end deffn

bytevector-u16-native-set!
@c snarfed from bytevectors.c:1413
@deffn {Scheme Procedure} bytevector-u16-native-set! bv index value
Store the unsigned integer @var{value} at index @var{index} of @var{bv} using the native endianness.
@end deffn

bytevector-s16-native-set!
@c snarfed from bytevectors.c:1424
@deffn {Scheme Procedure} bytevector-s16-native-set! bv index value
Store the signed integer @var{value} at index @var{index} of @var{bv} using the native endianness.
@end deffn

bytevector-u32-ref
@c snarfed from bytevectors.c:1480
@deffn {Scheme Procedure} bytevector-u32-ref bv index endianness
Return the unsigned 32-bit integer from @var{bv} at @var{index}.
@end deffn

bytevector-s32-ref
@c snarfed from bytevectors.c:1495
@deffn {Scheme Procedure} bytevector-s32-ref bv index endianness
Return the signed 32-bit integer from @var{bv} at @var{index}.
@end deffn

bytevector-u32-native-ref
@c snarfed from bytevectors.c:1510
@deffn {Scheme Procedure} bytevector-u32-native-ref bv index
Return the unsigned 32-bit integer from @var{bv} at @var{index} using the native endianness.
@end deffn

bytevector-s32-native-ref
@c snarfed from bytevectors.c:1525
@deffn {Scheme Procedure} bytevector-s32-native-ref bv index
Return the unsigned 32-bit integer from @var{bv} at @var{index} using the native endianness.
@end deffn

bytevector-u32-set!
@c snarfed from bytevectors.c:1540
@deffn {Scheme Procedure} bytevector-u32-set! bv index value endianness
Store @var{value} in @var{bv} at @var{index} according to @var{endianness}.
@end deffn

bytevector-s32-set!
@c snarfed from bytevectors.c:1555
@deffn {Scheme Procedure} bytevector-s32-set! bv index value endianness
Store @var{value} in @var{bv} at @var{index} according to @var{endianness}.
@end deffn

bytevector-u32-native-set!
@c snarfed from bytevectors.c:1570
@deffn {Scheme Procedure} bytevector-u32-native-set! bv index value
Store the unsigned integer @var{value} at index @var{index} of @var{bv} using the native endianness.
@end deffn

bytevector-s32-native-set!
@c snarfed from bytevectors.c:1585
@deffn {Scheme Procedure} bytevector-s32-native-set! bv index value
Store the signed integer @var{value} at index @var{index} of @var{bv} using the native endianness.
@end deffn

bytevector-u64-ref
@c snarfed from bytevectors.c:1606
@deffn {Scheme Procedure} bytevector-u64-ref bv index endianness
Return the unsigned 64-bit integer from @var{bv} at @var{index}.
@end deffn

bytevector-s64-ref
@c snarfed from bytevectors.c:1617
@deffn {Scheme Procedure} bytevector-s64-ref bv index endianness
Return the signed 64-bit integer from @var{bv} at @var{index}.
@end deffn

bytevector-u64-native-ref
@c snarfed from bytevectors.c:1628
@deffn {Scheme Procedure} bytevector-u64-native-ref bv index
Return the unsigned 64-bit integer from @var{bv} at @var{index} using the native endianness.
@end deffn

bytevector-s64-native-ref
@c snarfed from bytevectors.c:1639
@deffn {Scheme Procedure} bytevector-s64-native-ref bv index
Return the unsigned 64-bit integer from @var{bv} at @var{index} using the native endianness.
@end deffn

bytevector-u64-set!
@c snarfed from bytevectors.c:1650
@deffn {Scheme Procedure} bytevector-u64-set! bv index value endianness
Store @var{value} in @var{bv} at @var{index} according to @var{endianness}.
@end deffn

bytevector-s64-set!
@c snarfed from bytevectors.c:1661
@deffn {Scheme Procedure} bytevector-s64-set! bv index value endianness
Store @var{value} in @var{bv} at @var{index} according to @var{endianness}.
@end deffn

bytevector-u64-native-set!
@c snarfed from bytevectors.c:1672
@deffn {Scheme Procedure} bytevector-u64-native-set! bv index value
Store the unsigned integer @var{value} at index @var{index} of @var{bv} using the native endianness.
@end deffn

bytevector-s64-native-set!
@c snarfed from bytevectors.c:1683
@deffn {Scheme Procedure} bytevector-s64-native-set! bv index value
Store the signed integer @var{value} at index @var{index} of @var{bv} using the native endianness.
@end deffn

bytevector-ieee-single-ref
@c snarfed from bytevectors.c:1845
@deffn {Scheme Procedure} bytevector-ieee-single-ref bv index endianness
Return the IEEE-754 single from @var{bv} at @var{index}.
@end deffn

bytevector-ieee-single-native-ref
@c snarfed from bytevectors.c:1857
@deffn {Scheme Procedure} bytevector-ieee-single-native-ref bv index
Return the IEEE-754 single from @var{bv} at @var{index} using the native endianness.
@end deffn

bytevector-ieee-single-set!
@c snarfed from bytevectors.c:1869
@deffn {Scheme Procedure} bytevector-ieee-single-set! bv index value endianness
Store real @var{value} in @var{bv} at @var{index} according to @var{endianness}.
@end deffn

bytevector-ieee-single-native-set!
@c snarfed from bytevectors.c:1881
@deffn {Scheme Procedure} bytevector-ieee-single-native-set! bv index value
Store the real @var{value} at index @var{index} of @var{bv} using the native endianness.
@end deffn

bytevector-ieee-double-ref
@c snarfed from bytevectors.c:1896
@deffn {Scheme Procedure} bytevector-ieee-double-ref bv index endianness
Return the IEEE-754 double from @var{bv} at @var{index}.
@end deffn

bytevector-ieee-double-native-ref
@c snarfed from bytevectors.c:1908
@deffn {Scheme Procedure} bytevector-ieee-double-native-ref bv index
Return the IEEE-754 double from @var{bv} at @var{index} using the native endianness.
@end deffn

bytevector-ieee-double-set!
@c snarfed from bytevectors.c:1920
@deffn {Scheme Procedure} bytevector-ieee-double-set! bv index value endianness
Store real @var{value} in @var{bv} at @var{index} according to @var{endianness}.
@end deffn

bytevector-ieee-double-native-set!
@c snarfed from bytevectors.c:1932
@deffn {Scheme Procedure} bytevector-ieee-double-native-set! bv index value
Store the real @var{value} at index @var{index} of @var{bv} using the native endianness.
@end deffn

string->utf8
@c snarfed from bytevectors.c:2056
@deffn {Scheme Procedure} string->utf8 str
Return a newly allocated bytevector that contains the UTF-8 encoding of @var{str}.
@end deffn

string->utf16
@c snarfed from bytevectors.c:2078
@deffn {Scheme Procedure} string->utf16 str [endianness]
Return a newly allocated bytevector that contains the UTF-16 encoding of @var{str}.
@end deffn

string->utf32
@c snarfed from bytevectors.c:2097
@deffn {Scheme Procedure} string->utf32 str [endianness]
Return a newly allocated bytevector that contains the UTF-32 encoding of @var{str}.
@end deffn

utf8->string
@c snarfed from bytevectors.c:2158
@deffn {Scheme Procedure} utf8->string utf
Return a newly allocate string that contains from the UTF-8-encoded contents of bytevector @var{utf}.
@end deffn

utf16->string
@c snarfed from bytevectors.c:2179
@deffn {Scheme Procedure} utf16->string utf [endianness]
Return a newly allocate string that contains from the UTF-16-encoded contents of bytevector @var{utf}.
@end deffn

utf32->string
@c snarfed from bytevectors.c:2190
@deffn {Scheme Procedure} utf32->string utf [endianness]
Return a newly allocate string that contains from the UTF-32-encoded contents of bytevector @var{utf}.
@end deffn

char?
@c snarfed from chars.c:45
@deffn {Scheme Procedure} char? x
Return @code{#t} iff @var{x} is a character, else @code{#f}.
@end deffn

char=?
@c snarfed from chars.c:55
@deffn {Scheme Procedure} char=? [x [y . rest]]
Return @code{#t} if the Unicode code point of @var{x} is equal to the
code point of @var{y}, else @code{#f}.

@end deffn

char<?
@c snarfed from chars.c:86
@deffn {Scheme Procedure} char<? [x [y . rest]]
Return @code{#t} iff the code point of @var{x} is less than the code
point of @var{y}, else @code{#f}.
@end deffn

char<=?
@c snarfed from chars.c:116
@deffn {Scheme Procedure} char<=? [x [y . rest]]
Return @code{#t} if the Unicode code point of @var{x} is less than or
equal to the code point of @var{y}, else @code{#f}.
@end deffn

char>?
@c snarfed from chars.c:146
@deffn {Scheme Procedure} char>? [x [y . rest]]
Return @code{#t} if the Unicode code point of @var{x} is greater than
the code point of @var{y}, else @code{#f}.
@end deffn

char>=?
@c snarfed from chars.c:176
@deffn {Scheme Procedure} char>=? [x [y . rest]]
Return @code{#t} if the Unicode code point of @var{x} is greater than
or equal to the code point of @var{y}, else @code{#f}.
@end deffn

char-ci=?
@c snarfed from chars.c:213
@deffn {Scheme Procedure} char-ci=? [x [y . rest]]
Return @code{#t} if the case-folded Unicode code point of @var{x} is
the same as the case-folded code point of @var{y}, else @code{#f}.
@end deffn

char-ci<?
@c snarfed from chars.c:243
@deffn {Scheme Procedure} char-ci<? [x [y . rest]]
Return @code{#t} if the case-folded Unicode code point of @var{x} is
less than the case-folded code point of @var{y}, else @code{#f}.
@end deffn

char-ci<=?
@c snarfed from chars.c:273
@deffn {Scheme Procedure} char-ci<=? [x [y . rest]]
Return @code{#t} iff the case-folded Unicode code point of @var{x} is
less than or equal to the case-folded code point of @var{y}, else
@code{#f}
@end deffn

char-ci>?
@c snarfed from chars.c:304
@deffn {Scheme Procedure} char-ci>? [x [y . rest]]
Return @code{#t} iff the case-folded code point of @var{x} is greater
than the case-folded code point of @var{y}, else @code{#f}.
@end deffn

char-ci>=?
@c snarfed from chars.c:334
@deffn {Scheme Procedure} char-ci>=? [x [y . rest]]
Return @code{#t} iff the case-folded Unicode code point of @var{x} is
greater than or equal to the case-folded code point of @var{y}, else
@code{#f}.
@end deffn

char-alphabetic?
@c snarfed from chars.c:365
@deffn {Scheme Procedure} char-alphabetic? chr
Return @code{#t} iff @var{chr} is alphabetic, else @code{#f}.

@end deffn

char-numeric?
@c snarfed from chars.c:374
@deffn {Scheme Procedure} char-numeric? chr
Return @code{#t} iff @var{chr} is numeric, else @code{#f}.

@end deffn

char-whitespace?
@c snarfed from chars.c:383
@deffn {Scheme Procedure} char-whitespace? chr
Return @code{#t} iff @var{chr} is whitespace, else @code{#f}.

@end deffn

char-upper-case?
@c snarfed from chars.c:393
@deffn {Scheme Procedure} char-upper-case? chr
Return @code{#t} iff @var{chr} is uppercase, else @code{#f}.

@end deffn

char-lower-case?
@c snarfed from chars.c:403
@deffn {Scheme Procedure} char-lower-case? chr
Return @code{#t} iff @var{chr} is lowercase, else @code{#f}.

@end deffn

char-is-both?
@c snarfed from chars.c:412
@deffn {Scheme Procedure} char-is-both? chr
Return @code{#t} iff @var{chr} is either uppercase or lowercase, else
@code{#f}.

@end deffn

char->integer
@c snarfed from chars.c:425
@deffn {Scheme Procedure} char->integer chr
Return the Unicode code point of @var{chr}.
@end deffn

integer->char
@c snarfed from chars.c:436
@deffn {Scheme Procedure} integer->char n
Return the character that has Unicode code point @var{n}.  The integer
@var{n} must be a valid code point.  Valid code points are in the
ranges 0 to @code{#xD7FF} inclusive or @code{#xE000} to
@code{#x10FFFF} inclusive.
@end deffn

char-upcase
@c snarfed from chars.c:457
@deffn {Scheme Procedure} char-upcase chr
Return the uppercase character version of @var{chr}.
@end deffn

char-downcase
@c snarfed from chars.c:468
@deffn {Scheme Procedure} char-downcase chr
Return the lowercase character version of @var{chr}.
@end deffn

char-titlecase
@c snarfed from chars.c:478
@deffn {Scheme Procedure} char-titlecase chr
Return the titlecase character version of @var{chr}.
@end deffn

char-general-category
@c snarfed from chars.c:488
@deffn {Scheme Procedure} char-general-category chr
Return a symbol representing the Unicode general category of @var{chr} or @code{#f} if a named category cannot be found.
@end deffn

abort-to-prompt*
@c snarfed from control.c:107
@deffn {Scheme Procedure} abort-to-prompt* tag args
Abort to the nearest prompt with tag @var{tag}, yielding the
values in the list, @var{args}.
@end deffn

with-continuation-barrier
@c snarfed from continuations.c:492
@deffn {Scheme Procedure} with-continuation-barrier proc
Call @var{proc} and return its result.  Do not allow the invocation of
continuations that would leave or enter the dynamic extent of the call
to @code{with-continuation-barrier}.  Such an attempt causes an error
to be signaled.

Throws (such as errors) that are not caught from within @var{proc} are
caught by @code{with-continuation-barrier}.  In that case, a short
message is printed to the current error port and @code{#f} is returned.

Thus, @code{with-continuation-barrier} returns exactly once.

@end deffn

%make-custom-port
@c snarfed from custom-ports.c:137
@deffn {Scheme Procedure} %make-custom-port input_p output_p stream encoding conversion_strategy close_on_gc_p

@end deffn

%custom-port-data
@c snarfed from custom-ports.c:155
@deffn {Scheme Procedure} %custom-port-data port

@end deffn

debug-options-interface
@c snarfed from debug.c:107
@deffn {Scheme Procedure} debug-options-interface [setting]
Option interface for the debug options. Instead of using
this procedure directly, use the procedures @code{debug-enable},
@code{debug-disable}, @code{debug-set!} and @code{debug-options}.
@end deffn

bitvector-ref
@c snarfed from deprecated.c:176
@deffn {Scheme Procedure} bitvector-ref vec idx
Return the element at index @var{idx} of the bitvector
@var{vec}.
@end deffn

bitvector-set!
@c snarfed from deprecated.c:222
@deffn {Scheme Procedure} bitvector-set! vec idx val
Set the element at index @var{idx} of the bitvector
@var{vec} when @var{val} is true, else clear it.
@end deffn

bitvector-fill!
@c snarfed from deprecated.c:233
@deffn {Scheme Procedure} bitvector-fill! vec val
Set all elements of the bitvector
@var{vec} when @var{val} is true, else clear them.
@end deffn

bit-invert!
@c snarfed from deprecated.c:269
@deffn {Scheme Procedure} bit-invert! v
Modify the bit vector @var{v} by replacing each element with
its negation.
@end deffn

bit-count
@c snarfed from deprecated.c:298
@deffn {Scheme Procedure} bit-count b bitvector
Return the number of occurrences of the boolean @var{b} in
@var{bitvector}.
@end deffn

bit-count*
@c snarfed from deprecated.c:335
@deffn {Scheme Procedure} bit-count* v kv obj
Return a count of how many entries in bit vector @var{v} are
equal to @var{obj}, with @var{kv} selecting the entries to
consider.

If @var{kv} is a bit vector, then those entries where it has
@code{#t} are the ones in @var{v} which are considered.
@var{kv} and @var{v} must be the same length.

If @var{kv} is a u32vector, then it contains
the indexes in @var{v} to consider.

For example,

@example
(bit-count* #*01110111 #*11001101 #t) @result{} 3
(bit-count* #*01110111 #u32(7 0 4) #f)  @result{} 2
@end example
@end deffn

bit-position
@c snarfed from deprecated.c:421
@deffn {Scheme Procedure} bit-position item v k
Return the index of the first occurrence of @var{item} in bit
vector @var{v}, starting from @var{k}.  If there is no
@var{item} entry between @var{k} and the end of
@var{v}, then return @code{#f}.  For example,

@example
(bit-position #t #*000101 0)  @result{} 3
(bit-position #f #*0001111 3) @result{} #f
@end example
@end deffn

bit-set*!
@c snarfed from deprecated.c:463
@deffn {Scheme Procedure} bit-set*! v kv obj
Set entries of bit vector @var{v} to @var{obj}, with @var{kv}
selecting the entries to change.  The return value is
unspecified.

If @var{kv} is a bit vector, then those entries where it has
@code{#t} are the ones in @var{v} which are set to @var{obj}.
@var{v} must be at least as long as @var{kv}.  When @var{obj}
is @code{#t} it's like @var{kv} is OR'ed into @var{v}.  Or when
@var{obj} is @code{#f} it can be seen as an ANDNOT.

@example
(define bv #*01000010)
(bit-set*! bv #*10010001 #t)
bv
@result{} #*11010011
@end example

If @var{kv} is a u32vector, then its elements are
indices into @var{v} which are set to @var{obj}.

@example
(define bv #*01000010)
(bit-set*! bv #u32(5 2 7) #t)
bv
@result{} #*01100111
@end example
@end deffn

symbol-fref
@c snarfed from deprecated.c:687
@deffn {Scheme Procedure} symbol-fref s
Return the contents of the symbol @var{s}'s @dfn{function slot}.
@end deffn

symbol-pref
@c snarfed from deprecated.c:697
@deffn {Scheme Procedure} symbol-pref s
Return the @dfn{property list} currently associated with the
symbol @var{s}.
@end deffn

symbol-fset!
@c snarfed from deprecated.c:712
@deffn {Scheme Procedure} symbol-fset! s val
Change the binding of the symbol @var{s}'s function slot.
@end deffn

symbol-pset!
@c snarfed from deprecated.c:723
@deffn {Scheme Procedure} symbol-pset! s val
Change the binding of the symbol @var{s}'s property slot.
@end deffn

dynamic-unlink
@c snarfed from deprecated.c:735
@deffn {Scheme Procedure} dynamic-unlink obj

@end deffn

issue-deprecation-warning
@c snarfed from deprecation.c:104
@deffn {Scheme Procedure} issue-deprecation-warning . msgs
Output @var{msgs} to @code{(current-error-port)} when this is the first call to @code{issue-deprecation-warning} with this specific @var{msgs}.  Do nothing otherwise. The argument @var{msgs} should be a list of strings; they are printed in turn, each one followed by a newline.
@end deffn

include-deprecated-features
@c snarfed from deprecation.c:150
@deffn {Scheme Procedure} include-deprecated-features
Return @code{#t} iff deprecated features should be included in public interfaces.
@end deffn

dlopen
@c snarfed from dynl.c:67
@deffn {Scheme Procedure} dlopen name flags

@end deffn

dlclose
@c snarfed from dynl.c:91
@deffn {Scheme Procedure} dlclose obj

@end deffn

dlsym
@c snarfed from dynl.c:105
@deffn {Scheme Procedure} dlsym obj name

@end deffn

eq?
@c snarfed from eq.c:54
@deffn {Scheme Procedure} eq? [x [y . rest]]
Return @code{#t} if @var{x} and @var{y} are the same object,
except for numbers and characters.  For example,

@example
(define x (vector 1 2 3))
(define y (vector 1 2 3))

(eq? x x)  @result{} #t
(eq? x y)  @result{} #f
@end example

Numbers and characters are not equal to any other object, but
the problem is they're not necessarily @code{eq?} to themselves
either.  This is even so when the number comes directly from a
variable,

@example
(let ((n (+ 2 3)))
  (eq? n n))       @result{} *unspecified*
@end example

Generally @code{eqv?} should be used when comparing numbers or
characters.  @code{=} or @code{char=?} can be used too.

It's worth noting that end-of-list @code{()}, @code{#t},
@code{#f}, a symbol of a given name, and a keyword of a given
name, are unique objects.  There's just one of each, so for
instance no matter how @code{()} arises in a program, it's the
same object and can be compared with @code{eq?},

@example
(define x (cdr '(123)))
(define y (cdr '(456)))
(eq? x y) @result{} #t

(define x (string->symbol "foo"))
(eq? x 'foo) @result{} #t
@end example
@end deffn

eqv?
@c snarfed from eq.c:181
@deffn {Scheme Procedure} eqv? [x [y . rest]]
Return @code{#t} if @var{x} and @var{y} are the same object, or
for characters and numbers the same value.

On objects except characters and numbers, @code{eqv?} is the
same as @code{eq?}, it's true if @var{x} and @var{y} are the
same object.

If @var{x} and @var{y} are numbers or characters, @code{eqv?}
compares their type and value.  An exact number is not
@code{eqv?} to an inexact number (even if their value is the
same).

@example
(eqv? 3 (+ 1 2)) @result{} #t
(eqv? 1 1.0)     @result{} #f
@end example
@end deffn

equal?
@c snarfed from eq.c:241
@deffn {Scheme Procedure} equal? [x [y . rest]]
Return @code{#t} if @var{x} and @var{y} are the same type, and
their contents or value are equal.

For a pair, string, vector or array, @code{equal?} compares the
contents, and does so using using the same @code{equal?}
recursively, so a deep structure can be traversed.

@example
(equal? (list 1 2 3) (list 1 2 3))   @result{} #t
(equal? (list 1 2 3) (vector 1 2 3)) @result{} #f
@end example

For other objects, @code{equal?} compares as per @code{eqv?},
which means characters and numbers are compared by type and
value (and like @code{eqv?}, exact and inexact numbers are not
@code{equal?}, even if their value is the same).

@example
(equal? 3 (+ 1 2)) @result{} #t
(equal? 1 1.0)     @result{} #f
@end example

Hash tables are currently only compared as per @code{eq?}, so
two different tables are not @code{equal?}, even if their
contents are the same.

@code{equal?} does not support circular data structures, it may
go into an infinite loop if asked to compare two circular lists
or similar.

New application-defined object types (Smobs) have an
@code{equalp} handler which is called by @code{equal?}.  This
lets an application traverse the contents or control what is
considered @code{equal?} for two such objects.  If there's no
handler, the default is to just compare as per @code{eq?}.
@end deffn

scm-error
@c snarfed from error.c:70
@deffn {Scheme Procedure} scm-error key subr message args data
Raise an error with key @var{key}.  @var{subr} can be a string
naming the procedure associated with the error, or @code{#f}.
@var{message} is the error message string, possibly containing
@code{~S} and @code{~A} escapes.  When an error is reported,
these are replaced by formatting the corresponding members of
@var{args}: @code{~A} (was @code{%s} in older versions of
Guile) formats using @code{display} and @code{~S} (was
@code{%S}) formats using @code{write}.  @var{data} is a list or
@code{#f} depending on @var{key}: if @var{key} is
@code{system-error} then it should be a list containing the
Unix @code{errno} value; If @var{key} is @code{signal} then it
should be a list containing the Unix signal number; If
@var{key} is @code{out-of-range}, @code{wrong-type-arg},
or @code{keyword-argument-error}, it is a list containing the bad value; otherwise
it will usually be @code{#f}.
@end deffn

strerror
@c snarfed from error.c:113
@deffn {Scheme Procedure} strerror err
Return the Unix error message corresponding to @var{err}, which
must be an integer value.
@end deffn

eval
@c snarfed from eval.c:681
@deffn {Scheme Procedure} eval exp module_or_state
Evaluate @var{exp}, a list representing a Scheme expression,
in the top-level environment specified by
@var{module_or_state}.
While @var{exp} is evaluated (using @code{primitive-eval}),
@var{module_or_state} is made the current module when
it is a module, or the current dynamic state when it is
a dynamic state.Example: (eval '(+ 1 2) (interaction-environment))
@end deffn

defined?
@c snarfed from evalext.c:37
@deffn {Scheme Procedure} defined? sym [module]
Return @code{#t} if @var{sym} is defined in the module @var{module} or the current module when @var{module} is notspecified.
@end deffn

self-evaluating?
@c snarfed from evalext.c:62
@deffn {Scheme Procedure} self-evaluating? obj
Return #t for objects which Guile considers self-evaluating
@end deffn

macroexpand
@c snarfed from expand.c:1166
@deffn {Scheme Procedure} macroexpand exp
Expand the expression @var{exp}.
@end deffn

macroexpanded?
@c snarfed from expand.c:1175
@deffn {Scheme Procedure} macroexpanded? exp
Return @code{#t} if @var{exp} is an expanded expression.
@end deffn

load-extension
@c snarfed from extensions.c:133
@deffn {Scheme Procedure} load-extension lib init
Load and initialize the extension designated by LIB and INIT.
When there is no pre-registered function for LIB/INIT, this is
equivalent to

@lisp
(dynamic-call INIT (dynamic-link LIB))
@end lisp

When there is a pre-registered function, that function is called
instead.

Normally, there is no pre-registered function.  This option exists
only for situations where dynamic linking is unavailable or unwanted.
In that case, you would statically link your program with the desired
library, and register its init function right after Guile has been
initialized.

LIB should be a string denoting a shared library without any file type
suffix such as ".so".  The suffix is provided automatically.  It
should also not contain any directory components.  Libraries that
implement Guile Extensions should be put into the normal locations for
shared libraries.  We recommend to use the naming convention
libguile-bla-blum for a extension related to a module `(bla blum)'.

The normal way for a extension to be used is to write a small Scheme
file that defines a module, and to load the extension into this
module.  When the module is auto-loaded, the extension is loaded as
well.  For example,

@lisp
(define-module (bla blum))

(load-extension "libguile-bla-blum" "bla_init_blum")
@end lisp
@end deffn

add-fdes-finalizer!
@c snarfed from fdes-finalizers.c:46
@deffn {Scheme Procedure} add-fdes-finalizer! fd finalizer
Add a finalizer that will be called when @var{fd} is closed.
@end deffn

remove-fdes-finalizer!
@c snarfed from fdes-finalizers.c:65
@deffn {Scheme Procedure} remove-fdes-finalizer! fd finalizer
Remove a finalizer that was previously added to the file
descriptor @var{fd}.
@end deffn

program-arguments
@c snarfed from feature.c:56
@deffn {Scheme Procedure} program-arguments
@deffnx {Scheme Procedure} command-line
Return the list of command line arguments passed to Guile, as a list of
strings.  The list includes the invoked program name, which is usually
@code{"guile"}, but excludes switches and parameters for command line
options like @code{-e} and @code{-l}.
@end deffn

set-program-arguments
@c snarfed from feature.c:84
@deffn {Scheme Procedure} set-program-arguments lst
Set the command line arguments to be returned by
@code{program-arguments} (and @code{command-line}).  @var{lst}
should be a list of strings, the first of which is the program
name (either a script name, or just @code{"guile"}).

Program arguments are held in a fluid and therefore have a
separate value in each Guile thread.  Neither the list nor the
strings within it are copied, so should not be modified later.
@end deffn

chown
@c snarfed from filesys.c:149
@deffn {Scheme Procedure} chown object owner group
Change the ownership and group of the file referred to by @var{object} to
the integer values @var{owner} and @var{group}.  @var{object} can be
a string containing a file name or, if the platform
supports fchown, a port or integer file descriptor
which is open on the file.  The return value
is unspecified.

If @var{object} is a symbolic link, either the
ownership of the link or the ownership of the referenced file will be
changed depending on the operating system (lchown is
unsupported at present).  If @var{owner} or @var{group} is specified
as @code{-1}, then that ID is not changed.
@end deffn

chown-at
@c snarfed from filesys.c:191
@deffn {Scheme Procedure} chown-at dir name owner group [flags]
Like @code{chown}, but modify the owner and/or group of
the file named @var{name} in the directory referred to
by the file port @var{dir} instead.  The optional argument
@var{flags} is a bitmask.  If @code{AT_SYMLINK_NOFOLLOW} is
present, then @var{name} will not be dereferenced if it is a
symbolic link.
@end deffn

open-fdes
@c snarfed from filesys.c:227
@deffn {Scheme Procedure} open-fdes path flags [mode]
Similar to @code{open} but return a file descriptor instead of
a port.
@end deffn

open-fdes-at
@c snarfed from filesys.c:247
@deffn {Scheme Procedure} open-fdes-at dir path flags [mode]
Similar to @code{openat}, but return a file descriptor instead
of a port.
@end deffn

open
@c snarfed from filesys.c:300
@deffn {Scheme Procedure} open path flags [mode]
Open the file named by @var{path} for reading and/or writing.
@var{flags} is an integer specifying how the file should be opened.
@var{mode} is an integer specifying the permission bits of the file, if
it needs to be created, before the umask is applied.  The default is 666
(Unix itself has no default).

@var{flags} can be constructed by combining variables using @code{logior}.
Basic flags are:

@defvar O_RDONLY
Open the file read-only.
@end defvar
@defvar O_WRONLY
Open the file write-only.
@end defvar
@defvar O_RDWR
Open the file read/write.
@end defvar
@defvar O_APPEND
Append to the file instead of truncating.
@end defvar
@defvar O_CREAT
Create the file if it does not already exist.
@end defvar

See the Unix documentation of the @code{open} system call
for additional flags.
@end deffn

openat
@c snarfed from filesys.c:343
@deffn {Scheme Procedure} openat dir path flags [mode]
Similar to @code{open}, but resolve the file name @var{path}
relative to the directory referred to by the file port @var{dir}
instead.
@end deffn

close
@c snarfed from filesys.c:364
@deffn {Scheme Procedure} close fd_or_port
Similar to close-port (@pxref{Closing, close-port}),
but also works on file descriptors.  A side
effect of closing a file descriptor is that any ports using that file
descriptor are moved to a different file descriptor and have
their revealed counts set to zero.
@end deffn

close-fdes
@c snarfed from filesys.c:392
@deffn {Scheme Procedure} close-fdes fd
A simple wrapper for the @code{close} system call.
Close file descriptor @var{fd}, which must be an integer.
Unlike close (@pxref{Ports and File Descriptors, close}),
the file descriptor will be closed even if a port is using it.
The return value is unspecified.
@end deffn

stat
@c snarfed from filesys.c:549
@deffn {Scheme Procedure} stat object [exception_on_error]
Return an object containing various information about the file
determined by @var{object}.  @var{object} can be a string containing
a file name or a port or integer file descriptor which is open
on a file (in which case @code{fstat} is used as the underlying
system call).

If the optional @var{exception_on_error} argument is true, which
is the default, an exception will be raised if the underlying
system call returns an error, for example if the file is not
found or is not readable. Otherwise, an error will cause
@code{stat} to return @code{#f}.
The object returned by a successful call to @code{stat} can be
passed as a single parameter to the following procedures, all of
which return integers:

@table @code
@item stat:dev
The device containing the file.
@item stat:ino
The file serial number, which distinguishes this file from all
other files on the same device.
@item stat:mode
The mode of the file.  This includes file type information and
the file permission bits.  See @code{stat:type} and
@code{stat:perms} below.
@item stat:nlink
The number of hard links to the file.
@item stat:uid
The user ID of the file's owner.
@item stat:gid
The group ID of the file.
@item stat:rdev
Device ID; this entry is defined only for character or block
special files.
@item stat:size
The size of a regular file in bytes.
@item stat:atime
The last access time for the file.
@item stat:mtime
The last modification time for the file.
@item stat:ctime
The last modification time for the attributes of the file.
@item stat:blksize
The optimal block size for reading or writing the file, in
bytes.
@item stat:blocks
The amount of disk space that the file occupies measured in
units of 512 byte blocks.
@end table

In addition, the following procedures return the information
from stat:mode in a more convenient form:

@table @code
@item stat:type
A symbol representing the type of file.  Possible values are
regular, directory, symlink, block-special, char-special, fifo,
socket and unknown
@item stat:perms
An integer representing the access permission bits.
@end table
@end deffn

statat
@c snarfed from filesys.c:655
@deffn {Scheme Procedure} statat dir filename [flags]
Like @code{stat}, but resolve @var{filename} relative to the
directory referred to by the file port @var{dir} instead.

The optional argument @var{flags} argument can be
@code{AT_SYMLINK_NOFOLLOW}, in which case @var{filename} will
not be dereferenced even if it is a symbolic link.
@end deffn

lstat
@c snarfed from filesys.c:693
@deffn {Scheme Procedure} lstat str
Similar to @code{stat}, but does not follow symbolic links, i.e.,
it will return information about a symbolic link itself, not the
file it points to.  @var{str} must be a string.
@end deffn

link
@c snarfed from filesys.c:722
@deffn {Scheme Procedure} link oldpath newpath
Creates a new name @var{newpath} in the file system for the
file named by @var{oldpath}.  If @var{oldpath} is a symbolic
link, the link may or may not be followed depending on the
system.
@end deffn

chdir
@c snarfed from filesys.c:746
@deffn {Scheme Procedure} chdir str
Change the current working directory to @var{str}.
@var{str} can be a string containing a file name,
or a port if supported by the system.
@code{(provided? 'chdir-port)} reports whether ports are supported.The return value is unspecified.
@end deffn

select
@c snarfed from filesys.c:918
@deffn {Scheme Procedure} select reads writes excepts [secs [usecs]]
This procedure has a variety of uses: waiting for the ability
to provide input, accept output, or the existence of
exceptional conditions on a collection of ports or file
descriptors, or waiting for a timeout to occur.

When an error occurs, this procedure throws a
@code{system-error} exception (@pxref{Conventions, @code{system-error}}).

@var{reads}, @var{writes} and @var{excepts} can be lists or
vectors, with each member a port or a file descriptor.
The value returned is a list of three corresponding
lists or vectors containing only the members which meet the
specified requirement.  The ability of port buffers to
provide input or accept output is taken into account.
Ordering of the input lists or vectors is not preserved.

The optional arguments @var{secs} and @var{usecs} specify the
timeout.  Either @var{secs} can be specified alone, as
either an integer or a real number, or both @var{secs} and
@var{usecs} can be specified as integers, in which case
@var{usecs} is an additional timeout expressed in
microseconds.  If @var{secs} is omitted or is @code{#f} then
select will wait for as long as it takes for one of the other
conditions to be satisfied.

The scsh version of @code{select} differs as follows:
Only vectors are accepted for the first three arguments.
The @var{usecs} argument is not supported.
Multiple values are returned instead of a list.
Duplicates in the input vectors appear only once in output.
An additional @code{select!} interface is provided.
@end deffn

fcntl
@c snarfed from filesys.c:1075
@deffn {Scheme Procedure} fcntl object cmd [value]
Apply @var{cmd} to the specified file descriptor or the underlying
file descriptor of the specified port.  @var{value} is an optional
integer argument.

Values for @var{cmd} are:

@table @code
@item F_DUPFD
Duplicate a file descriptor
@item F_GETFD
Get flags associated with the file descriptor.
@item F_SETFD
Set flags associated with the file descriptor to @var{value}.
@item F_GETFL
Get flags associated with the open file.
@item F_SETFL
Set flags associated with the open file to @var{value}
@item F_GETOWN
Get the process ID of a socket's owner, for @code{SIGIO} signals.
@item F_SETOWN
Set the process that owns a socket to @var{value}, for @code{SIGIO} signals.
@item FD_CLOEXEC
The value used to indicate the "close on exec" flag with @code{F_GETFL} or
@code{F_SETFL}.
@end table
@end deffn

fsync
@c snarfed from filesys.c:1126
@deffn {Scheme Procedure} fsync object
Copies any unwritten data for the specified output file
descriptor to disk.  If @var{object} is a port, its buffer is
flushed before the underlying file descriptor is fsync'd.
The return value is unspecified.
@end deffn

symlink
@c snarfed from filesys.c:1153
@deffn {Scheme Procedure} symlink oldpath newpath
Create a symbolic link named @var{newpath} with the value
(i.e., pointing to) @var{oldpath}.  The return value is
unspecified.
@end deffn

symlinkat
@c snarfed from filesys.c:1173
@deffn {Scheme Procedure} symlinkat dir oldpath newpath
Like @code{symlink}, but resolve @var{newpath} relative
to the directory referred to by the file port @var{dir}.
@end deffn

readlink
@c snarfed from filesys.c:1209
@deffn {Scheme Procedure} readlink path
Return the value of the symbolic link named by @var{path} (a
string, or a port if supported by the system),
i.e., the file that the link points to.
To read a symbolic link represented by a port, the symbolic
link must have been opened with the @code{O_NOFOLLOW} and
@code{O_PATH} flags.@code{(provided? 'readlink-port)} reports whether ports are
supported.
@end deffn

copy-file
@c snarfed from filesys.c:1283
@deffn {Scheme Procedure} copy-file oldfile newfile . rest
Copy the file specified by @var{oldfile} to @var{newfile}.
The return value is unspecified.

@code{#:copy-on-write} keyword argument determines whether copy-on-write copy should be attempted and the behavior in case of failure.  Possible values are @code{'always} (attempt the copy-on-write, return error if it fails), @code{'auto} (attempt the copy-on-write, fallback to regular copy if it fails) and @code{'never} (perform the regular copy).
@end deffn

sendfile
@c snarfed from filesys.c:1370
@deffn {Scheme Procedure} sendfile out in count [offset]
Send @var{count} bytes from @var{in} to @var{out}, both of which must be either open file ports or file descriptors.  When @var{offset} is omitted, start reading from @var{in}'s current position; otherwise, start reading at @var{offset}.  Return the number of bytes actually sent.
@end deffn

getcwd
@c snarfed from filesys.c:1487
@deffn {Scheme Procedure} getcwd
Return the name of the current working directory.
@end deffn

mkdir
@c snarfed from filesys.c:1521
@deffn {Scheme Procedure} mkdir path [mode]
Create a new directory named by @var{path}.  If @var{mode} is omitted
then the permissions of the directory are set to @code{#o777}
masked with the current umask (@pxref{Processes, @code{umask}}).
Otherwise they are set to the value specified with @var{mode}.
The return value is unspecified.
@end deffn

mkdirat
@c snarfed from filesys.c:1544
@deffn {Scheme Procedure} mkdirat dir path [mode]
Like @code{mkdir}, but resolve @var{path} relative to the directory
referred to by the file port @var{dir} instead.
@end deffn

rmdir
@c snarfed from filesys.c:1568
@deffn {Scheme Procedure} rmdir path
Remove the existing directory named by @var{path}.  The directory must
be empty for this to succeed.  The return value is unspecified.
@end deffn

rename-file
@c snarfed from filesys.c:1583
@deffn {Scheme Procedure} rename-file oldname newname
Renames the file specified by @var{oldname} to @var{newname}.
The return value is unspecified.
@end deffn

rename-file-at
@c snarfed from filesys.c:1601
@deffn {Scheme Procedure} rename-file-at olddir oldname newdir newname
Like @code{rename-file}, but when @var{olddir} or @var{newdir}
is true, resolve @var{oldname} or @var{newname} relative to
the directory specified by file port @var{olddir} or
@var{newdir} instead of the current working directory.
@end deffn

delete-file
@c snarfed from filesys.c:1635
@deffn {Scheme Procedure} delete-file str
Deletes (or "unlinks") the file specified by @var{str}.
@end deffn

delete-file-at
@c snarfed from filesys.c:1649
@deffn {Scheme Procedure} delete-file-at dir str [flags]
Like @code{unlink}, but resolve @var{str} relative to the
directory referred to by the file port @var{dir} instead.

The optional @var{flags} argument can be @code{AT_REMOVEDIR},
in which case @code{delete-file-at} will act like @code{rmdir} instead
of @code{delete-file}.  Why doesn't POSIX have a @code{rmdirat} function
for this instead?  No idea!
@end deffn

access?
@c snarfed from filesys.c:1680
@deffn {Scheme Procedure} access? path how
Test accessibility of a file under the real UID and GID of the
calling process.  The return is @code{#t} if @var{path} exists
and the permissions requested by @var{how} are all allowed, or
@code{#f} if not.

@var{how} is an integer which is one of the following values,
or a bitwise-OR (@code{logior}) of multiple values.

@defvar R_OK
Test for read permission.
@end defvar
@defvar W_OK
Test for write permission.
@end defvar
@defvar X_OK
Test for execute permission.
@end defvar
@defvar F_OK
Test for existence of the file.  This is implied by each of the
other tests, so there's no need to combine it with them.
@end defvar

It's important to note that @code{access?} does not simply
indicate what will happen on attempting to read or write a
file.  In normal circumstances it does, but in a set-UID or
set-GID program it doesn't because @code{access?} tests the
real ID, whereas an open or execute attempt uses the effective
ID.

A program which will never run set-UID/GID can ignore the
difference between real and effective IDs, but for maximum
generality, especially in library functions, it's best not to
use @code{access?} to predict the result of an open or execute,
instead simply attempt that and catch any exception.

The main use for @code{access?} is to let a set-UID/GID program
determine what the invoking user would have been allowed to do,
without the greater (or perhaps lesser) privileges afforded by
the effective ID.  For more on this, see ``Testing File
Access'' in The GNU C Library Reference Manual.
@end deffn

chmod
@c snarfed from filesys.c:1735
@deffn {Scheme Procedure} chmod object mode
Changes the permissions of the file referred to by
@var{object}.  @var{object} can be a string containing a file
name or a port or integer file descriptor which is open on a
file (in which case @code{fchmod} is used as the underlying
system call).  @var{mode} specifies the new permissions as a
decimal number, e.g., @code{(chmod "foo" #o755)}.
The return value is unspecified.
@end deffn

chmodat
@c snarfed from filesys.c:1773
@deffn {Scheme Procedure} chmodat dir pathname mode [flags]
Like @var{chmod}, but modify the permissions of the file named
@var{pathname} in the directory referred to by the file port
@var{dir} instead.
The optional @var{flags} argument may be 0 or @code{AT_SYMLINK_NOFOLLOW},
in which case @var{pathname} is not dereferenced if it is a symbolic link,
i.e., the permissions of the symbolic link itself are modified.

Note that @code{AT_SYMLINK_NOFOLLOW} is not supported on all systems
and may result in @code{ENOTSUP}.
@end deffn

umask
@c snarfed from filesys.c:1808
@deffn {Scheme Procedure} umask [mode]
If @var{mode} is omitted, returns a decimal number representing the current
file creation mask.  Otherwise the file creation mask is set to
@var{mode} and the previous value is returned.

E.g., @code{(umask #o022)} sets the mask to octal 22, decimal 18.
@end deffn

mkstemp
@c snarfed from filesys.c:1831
@deffn {Scheme Procedure} mkstemp tmpl [mode]
Create a new unique file in the file system.  Return
a buffered port open for reading and writing to the file.

@var{tmpl} is a string specifying where the file should be
created: it must end with @samp{XXXXXX}.  The name of the
newly created file will be the same as @var{tmpl}, but with
those @samp{X}s changed, and can be determined by calling
@code{port-filename} on the returned port.

Note that the newly created file is not deleted automatically
by Guile; probably the caller should arrange to call
@code{delete-file} when the file is no longer needed.

POSIX doesn't specify the permissions mode of the file.
On GNU and most systems it's @code{#o600}.  An application can
use @code{chmod} to relax that if desired.  For example
@code{#o666} less @code{umask}, which is usual for ordinary
file creation,

@example
(let ((port (mkstemp "/tmp/myfile-XXXXXX")))
  (chmod port (logand #o666 (lognot (umask))))
  ...)
@end example

The optional @var{mode} argument specifies a mode, as a string
in the same format that @code{open-file} takes.  It defaults
to @code{"w+"}.
@end deffn

mkstemp!
@c snarfed from filesys.c:1914
@deffn {Scheme Procedure} mkstemp! tmpl [mode]
Create a new unique file in the file system and return a new
buffered port open for reading and writing to the file.

@var{tmpl} is a string specifying where the file should be
created: it must end with @samp{XXXXXX} and those @samp{X}s
will be changed in the string to return the name of the file.
(@code{port-filename} on the port also gives the name.)

POSIX doesn't specify the permissions mode of the file, on GNU
and most systems it's @code{#o600}.  An application can use
@code{chmod} to relax that if desired.  For example
@code{#o666} less @code{umask}, which is usual for ordinary
file creation,

@example
(let ((port (mkstemp! (string-copy "/tmp/myfile-XXXXXX"))))
  (chmod port (logand #o666 (lognot (umask))))
  ...)
@end example

The optional @var{mode} argument specifies a mode, as a string
in the same format that @code{open-file} takes.  It defaults
to @code{"w+"}.
@end deffn

mkdtemp
@c snarfed from filesys.c:1956
@deffn {Scheme Procedure} mkdtemp tmpl
Create a new unique directory in the file system named in
accordance with @var{tmpl}. The last six characters of the
template must be 'XXXXXX'.

Upon success, this procedure returns the name of the
directory created.

An error may be thrown if the template is incorrect or if
the directory could not be created.

@end deffn

system-file-name-convention
@c snarfed from filesys.c:2002
@deffn {Scheme Procedure} system-file-name-convention
Return either @code{posix} or @code{windows}, depending on
what kind of system this Guile is running on.
@end deffn

dirname
@c snarfed from filesys.c:2012
@deffn {Scheme Procedure} dirname filename
Return the directory name component of the file name
@var{filename}. If @var{filename} does not contain a directory
component, @code{.} is returned.
@end deffn

basename
@c snarfed from filesys.c:2038
@deffn {Scheme Procedure} basename filename [suffix]
Return the base name of the file name @var{filename}. The
base name is the file name without any directory components.
If @var{suffix} is provided, and is equal to the end of
@var{filename}, it is removed also.
@end deffn

canonicalize-path
@c snarfed from filesys.c:2080
@deffn {Scheme Procedure} canonicalize-path path
Return the canonical path of @var{path}. A canonical path has
no @code{.} or @code{..} components, nor any repeated path
separators (@code{/}) nor symlinks.

Raises an error if any component of @var{path} does not exist.
@end deffn

directory-stream?
@c snarfed from filesys.c:2179
@deffn {Scheme Procedure} directory-stream? obj
Return a boolean indicating whether @var{obj} is a directory
stream as returned by @code{opendir}.
@end deffn

opendir
@c snarfed from filesys.c:2190
@deffn {Scheme Procedure} opendir dirname
Open the directory specified by @var{dirname} and return a directory
stream.
@end deffn

readdir
@c snarfed from filesys.c:2212
@deffn {Scheme Procedure} readdir port
Return (as a string) the next directory entry from the directory stream
@var{port}.  If there is no remaining entry to be read then the
end of file object is returned.
@end deffn

rewinddir
@c snarfed from filesys.c:2247
@deffn {Scheme Procedure} rewinddir port
Reset the directory port @var{port} so that the next call to
@code{readdir} will return the first directory entry.
@end deffn

closedir
@c snarfed from filesys.c:2270
@deffn {Scheme Procedure} closedir port
Close the directory stream @var{port}.
The return value is unspecified.
@end deffn

make-fluid
@c snarfed from fluids.c:237
@deffn {Scheme Procedure} make-fluid [dflt]
Return a newly created fluid, whose initial value is @var{dflt},
or @code{#f} if @var{dflt} is not given.
Fluids are objects that can hold one
value per dynamic state.  That is, modifications to this value are
only visible to code that executes with the same dynamic state as
the modifying code.  When a new dynamic state is constructed, it
inherits the values from its parent.  Because each thread normally executes
with its own dynamic state, you can use fluids for thread local storage.
@end deffn

make-unbound-fluid
@c snarfed from fluids.c:253
@deffn {Scheme Procedure} make-unbound-fluid
Make a fluid that is initially unbound.
@end deffn

make-thread-local-fluid
@c snarfed from fluids.c:262
@deffn {Scheme Procedure} make-thread-local-fluid [dflt]
Return a newly created fluid, whose initial value is @var{dflt},
or @code{#f} if @var{dflt} is not given.  Unlike fluids made
with @code{make-fluid}, thread local fluids are not captured
by @code{make-dynamic-state}.  Similarly, a newly spawned
child thread does not inherit thread-local fluid values from
the parent thread.
@end deffn

fluid?
@c snarfed from fluids.c:277
@deffn {Scheme Procedure} fluid? obj
Return @code{#t} iff @var{obj} is a fluid; otherwise, return
@code{#f}.
@end deffn

fluid-thread-local?
@c snarfed from fluids.c:287
@deffn {Scheme Procedure} fluid-thread-local? fluid
Return @code{#t} if the fluid @var{fluid} is is thread local,
or @code{#f} otherwise.
@end deffn

fluid-ref
@c snarfed from fluids.c:379
@deffn {Scheme Procedure} fluid-ref fluid
Return the value associated with @var{fluid} in the current
dynamic root.  If @var{fluid} has not been set, then return
its default value.
@end deffn

fluid-ref*
@c snarfed from fluids.c:391
@deffn {Scheme Procedure} fluid-ref* fluid depth
Return the @var{depth}th oldest value associated with
@var{fluid} in the current thread.  If @var{depth} equals
or exceeds the number of values that have been assigned to
@var{fluid}, return the default value of the fluid.
@end deffn

fluid-set!
@c snarfed from fluids.c:443
@deffn {Scheme Procedure} fluid-set! fluid value
Set the value associated with @var{fluid} in the current dynamic root.
@end deffn

fluid-unset!
@c snarfed from fluids.c:454
@deffn {Scheme Procedure} fluid-unset! fluid
Unset the value associated with @var{fluid}.
@end deffn

fluid-bound?
@c snarfed from fluids.c:468
@deffn {Scheme Procedure} fluid-bound? fluid
Return @code{#t} iff @var{fluid} is bound to a value.
Throw an error if @var{fluid} is not a fluid.
@end deffn

with-fluids*
@c snarfed from fluids.c:495
@deffn {Scheme Procedure} with-fluids* fluids values thunk
Set @var{fluids} to @var{values} temporary, and call @var{thunk}.
@var{fluids} must be a list of fluids and @var{values} must be the same
number of their values to be applied.  Each substitution is done
one after another.  @var{thunk} must be a procedure with no argument.
@end deffn

dynamic-state?
@c snarfed from fluids.c:588
@deffn {Scheme Procedure} dynamic-state? obj
Return @code{#t} if @var{obj} is a dynamic state object;
return @code{#f} otherwise
@end deffn

current-dynamic-state
@c snarfed from fluids.c:604
@deffn {Scheme Procedure} current-dynamic-state
Return a snapshot of the current fluid-value associations
as a fresh dynamic state object.
@end deffn

set-current-dynamic-state
@c snarfed from fluids.c:616
@deffn {Scheme Procedure} set-current-dynamic-state state
Set the current dynamic state object to @var{state}
and return the previous current dynamic state object.
@end deffn

with-dynamic-state
@c snarfed from fluids.c:666
@deffn {Scheme Procedure} with-dynamic-state state proc
Call @var{proc} while @var{state} is the current dynamic
state object.
@end deffn

pointer?
@c snarfed from foreign.c:130
@deffn {Scheme Procedure} pointer? obj
Return @code{#t} if @var{obj} is a pointer object, @code{#f} otherwise.

@end deffn

make-pointer
@c snarfed from foreign.c:140
@deffn {Scheme Procedure} make-pointer address [finalizer]
Return a foreign pointer object pointing to @var{address}. If @var{finalizer} is passed, it should be a pointer to a one-argument C function that will be called when the pointer object becomes unreachable.
@end deffn

pointer-address
@c snarfed from foreign.c:192
@deffn {Scheme Procedure} pointer-address pointer
Return the numerical value of @var{pointer}.
@end deffn

pointer->scm
@c snarfed from foreign.c:203
@deffn {Scheme Procedure} pointer->scm pointer
Unsafely cast @var{pointer} to a Scheme object.
Cross your fingers!
@end deffn

scm->pointer
@c snarfed from foreign.c:215
@deffn {Scheme Procedure} scm->pointer scm
Return a foreign pointer object with the @code{object-address}
of @var{scm}.
@end deffn

pointer->bytevector
@c snarfed from foreign.c:231
@deffn {Scheme Procedure} pointer->bytevector pointer len [offset [uvec_type]]
Return a bytevector aliasing the @var{len} bytes pointed
to by @var{pointer}.

The user may specify an alternate default interpretation for
the memory by passing the @var{uvec_type} argument, to indicate
that the memory is an array of elements of that type.
@var{uvec_type} should be something that
@code{uniform-vector-element-type} would return, like @code{f32}
or @code{s16}.

When @var{offset} is passed, it specifies the offset in bytes
relative to @var{pointer} of the memory region aliased by the
returned bytevector.
@end deffn

bytevector->pointer
@c snarfed from foreign.c:302
@deffn {Scheme Procedure} bytevector->pointer bv [offset]
Return a pointer pointer aliasing the memory pointed to by
@var{bv} or @var{offset} bytes after @var{bv} when @var{offset}
is passed.
@end deffn

set-pointer-finalizer!
@c snarfed from foreign.c:328
@deffn {Scheme Procedure} set-pointer-finalizer! pointer finalizer
Arrange for the C procedure wrapped by @var{finalizer} to be
called on the pointer wrapped by @var{pointer} when @var{pointer}
becomes unreachable. Note: the C procedure should not call into
Scheme. If you need a Scheme finalizer, use guardians.
@end deffn

dereference-pointer
@c snarfed from foreign.c:359
@deffn {Scheme Procedure} dereference-pointer pointer
Assuming @var{pointer} points to a memory region that
holds a pointer, return this pointer.
@end deffn

string->pointer
@c snarfed from foreign.c:377
@deffn {Scheme Procedure} string->pointer string [encoding]
Return a foreign pointer to a nul-terminated copy of
@var{string} in the given @var{encoding}, defaulting to
the current locale encoding.  The C string is freed when
the returned foreign pointer becomes unreachable.

This is the Scheme equivalent of @code{scm_to_stringn}.
@end deffn

pointer->string
@c snarfed from foreign.c:416
@deffn {Scheme Procedure} pointer->string pointer [length [encoding]]
Return the string representing the C string pointed to by
@var{pointer}.  If @var{length} is omitted or @code{-1}, the
string is assumed to be nul-terminated.  Otherwise
@var{length} is the number of bytes in memory pointed to by
@var{pointer}.  The C string is assumed to be in the given
@var{encoding}, defaulting to the current locale encoding.

This is the Scheme equivalent of @code{scm_from_stringn}.
@end deffn

alignof
@c snarfed from foreign.c:462
@deffn {Scheme Procedure} alignof type
Return the alignment of @var{type}, in bytes.

@var{type} should be a valid C type, like @code{int}.
Alternately @var{type} may be the symbol @code{*}, in which
case the alignment of a pointer is returned. @var{type} may
also be a list of types, in which case the alignment of a
@code{struct} with ABI-conventional packing is returned.
@end deffn

sizeof
@c snarfed from foreign.c:538
@deffn {Scheme Procedure} sizeof type
Return the size of @var{type}, in bytes.

@var{type} should be a valid C type, like @code{int}.
Alternately @var{type} may be the symbol @code{*}, in which
case the size of a pointer is returned. @var{type} may also
be a list of types, in which case the size of a @code{struct}
with ABI-conventional packing is returned.
@end deffn

pointer->procedure
@c snarfed from foreign.c:848
@deffn {Scheme Procedure} pointer->procedure return_type func_ptr arg_types . keyword_args
Make a foreign function.

Given the foreign void pointer @var{func_ptr}, its argument and
return types @var{arg_types} and @var{return_type}, return a
procedure that will pass arguments to the foreign function
and return appropriate values.

@var{arg_types} should be a list of foreign types.
@code{return_type} should be a foreign type.
If the @code{#:return-errno?} keyword argument is provided and
its value is true, then the returned procedure will return two
values, with @code{errno} as the second value.
@end deffn

procedure->pointer
@c snarfed from foreign.c:1190
@deffn {Scheme Procedure} procedure->pointer return_type proc arg_types
Return a pointer to a C function of type @var{return_type}
taking arguments of types @var{arg_types} (a list) and
behaving as a proxy to procedure @var{proc}.  Thus
@var{proc}'s arity, supported argument types, and return
type should match @var{return_type} and @var{arg_types}.

@end deffn

file-port?
@c snarfed from fports.c:116
@deffn {Scheme Procedure} file-port? obj
Determine whether @var{obj} is a port that is related to a file.
@end deffn

open-file
@c snarfed from fports.c:343
@deffn {Scheme Procedure} open-file filename mode . keyword_args
Open the file whose name is @var{filename}, and return a port
representing that file.  The attributes of the port are
determined by the @var{mode} string.  The way in which this is
interpreted is similar to C stdio.  The first character must be
one of the following:
@table @samp
@item r
Open an existing file for input.
@item w
Open a file for output, creating it if it doesn't already exist
or removing its contents if it does.
@item a
Open a file for output, creating it if it doesn't already
exist.  All writes to the port will go to the end of the file.
The "append mode" can be turned off while the port is in use
@pxref{Ports and File Descriptors, fcntl}
@end table
The following additional characters can be appended:
@table @samp
@item b
Open the underlying file in binary mode, if supported by the system.
Also, open the file using the binary-compatible character encoding
"ISO-8859-1", ignoring the default port encoding.
@item +
Open the port for both input and output.  E.g., @code{r+}: open
an existing file for both input and output.
@item e
Mark the underlying file descriptor as close-on-exec, as per the
@code{O_CLOEXEC} flag.
@item 0
Create an "unbuffered" port.  In this case input and output
operations are passed directly to the underlying port
implementation without additional buffering.  This is likely to
slow down I/O operations.  The buffering mode can be changed
while a port is in use @pxref{Ports and File Descriptors,
setvbuf}
@item l
Add line-buffering to the port.  The port output buffer will be
automatically flushed whenever a newline character is written.
@end table
In theory we could create read/write ports which were buffered
in one direction only.  However this isn't included in the
current interfaces.  If a file cannot be opened with the access
requested, @code{open-file} throws an exception.
@end deffn

port-revealed
@c snarfed from fports.c:506
@deffn {Scheme Procedure} port-revealed port
Return the revealed count for @var{port}.
@end deffn

set-port-revealed!
@c snarfed from fports.c:518
@deffn {Scheme Procedure} set-port-revealed! port rcount
Sets the revealed count for a port to a given value.
The return value is unspecified.
@end deffn

adjust-port-revealed!
@c snarfed from fports.c:537
@deffn {Scheme Procedure} adjust-port-revealed! port addend
Add @var{addend} to the revealed count of @var{port}.
The return value is unspecified.
@end deffn

gc-stats
@c snarfed from gc.c:163
@deffn {Scheme Procedure} gc-stats
Return an association list of statistics about Guile's current
use of storage.

@end deffn

gc-dump
@c snarfed from gc.c:195
@deffn {Scheme Procedure} gc-dump
Dump information about the garbage collector's internal data structures and memory usage to the standard output.
@end deffn

object-address
@c snarfed from gc.c:208
@deffn {Scheme Procedure} object-address obj
Return an integer that for the lifetime of @var{obj} is uniquely
returned by this function for @var{obj}
@end deffn

gc-disable
@c snarfed from gc.c:219
@deffn {Scheme Procedure} gc-disable
Disables the garbage collector.  Nested calls are permitted.  GC is re-enabled once @code{gc-enable} has been called the same number of times @code{gc-disable} was called.
@end deffn

gc-enable
@c snarfed from gc.c:231
@deffn {Scheme Procedure} gc-enable
Enables the garbage collector.
@end deffn

gc
@c snarfed from gc.c:242
@deffn {Scheme Procedure} gc
Scans all of SCM objects and reclaims for further use those that are
no longer accessible.
@end deffn

gettext
@c snarfed from gettext.c:89
@deffn {Scheme Procedure} gettext msgid [domain [category]]
Return the translation of @var{msgid} in the message domain @var{domain}. @var{domain} is optional and defaults to the domain set through (textdomain).  @var{category} is optional and defaults to LC_MESSAGES.
@end deffn

ngettext
@c snarfed from gettext.c:144
@deffn {Scheme Procedure} ngettext msgid msgid_plural n [domain [category]]
Return the translation of @var{msgid}/@var{msgid_plural} in the message domain @var{domain}, with the plural form being chosen appropriately for the number @var{n}.  @var{domain} is optional and defaults to the domain set through (textdomain). @var{category} is optional and defaults to LC_MESSAGES.
@end deffn

textdomain
@c snarfed from gettext.c:209
@deffn {Scheme Procedure} textdomain [domainname]
If optional parameter @var{domainname} is supplied, set the textdomain.  Return the textdomain.
@end deffn

bindtextdomain
@c snarfed from gettext.c:241
@deffn {Scheme Procedure} bindtextdomain domainname [directory]
If optional parameter @var{directory} is supplied, set message catalogs to directory @var{directory}.  Return the directory bound to @var{domainname}.
@end deffn

bind-textdomain-codeset
@c snarfed from gettext.c:280
@deffn {Scheme Procedure} bind-textdomain-codeset domainname [encoding]
If optional parameter @var{encoding} is supplied, set encoding for message catalogs of @var{domainname}.  Return the encoding of @var{domainname}.
@end deffn

make-generalized-vector
@c snarfed from generalized-vectors.c:57
@deffn {Scheme Procedure} make-generalized-vector type len [fill]
Make a generalized vector
@end deffn

%make-vtable-vtable
@c snarfed from goops.c:153
@deffn {Scheme Procedure} %make-vtable-vtable layout

@end deffn

%init-layout!
@c snarfed from goops.c:169
@deffn {Scheme Procedure} %init-layout! class layout

@end deffn

class-of
@c snarfed from goops.c:201
@deffn {Scheme Procedure} class-of x
Return the class of @var{x}.
@end deffn

instance?
@c snarfed from goops.c:348
@deffn {Scheme Procedure} instance? obj
Return @code{#t} if @var{obj} is an instance.
@end deffn

generic-function-name
@c snarfed from goops.c:417
@deffn {Scheme Procedure} generic-function-name obj
Return the name of the generic function @var{obj}.
@end deffn

%clear-fields!
@c snarfed from goops.c:481
@deffn {Scheme Procedure} %clear-fields! obj unbound

@end deffn

%modify-instance
@c snarfed from goops.c:505
@deffn {Scheme Procedure} %modify-instance old new
Used by change-class to modify objects in place.
@end deffn

generic-capability?
@c snarfed from goops.c:548
@deffn {Scheme Procedure} generic-capability? proc

@end deffn

enable-primitive-generic!
@c snarfed from goops.c:559
@deffn {Scheme Procedure} enable-primitive-generic! . subrs

@end deffn

set-primitive-generic!
@c snarfed from goops.c:579
@deffn {Scheme Procedure} set-primitive-generic! subr generic

@end deffn

primitive-generic-generic
@c snarfed from goops.c:591
@deffn {Scheme Procedure} primitive-generic-generic subr

@end deffn

%goops-early-init
@c snarfed from goops.c:879
@deffn {Scheme Procedure} %goops-early-init

@end deffn

%goops-loaded
@c snarfed from goops.c:960
@deffn {Scheme Procedure} %goops-loaded
Announce that GOOPS is loaded and perform initialization
on the C level which depends on the loaded GOOPS modules.
@end deffn

make-guardian
@c snarfed from guardians.c:309
@deffn {Scheme Procedure} make-guardian
Create a new guardian.  A guardian protects a set of objects from
garbage collection, allowing a program to apply cleanup or other
actions.

@code{make-guardian} returns a procedure representing the guardian.
Calling the guardian procedure with an argument adds the argument to
the guardian's set of protected objects.  Calling the guardian
procedure without an argument returns one of the protected objects
which are ready for garbage collection, or @code{#f} if no such object
is available.  Objects which are returned in this way are removed from
the guardian.

You can put a single object into a guardian more than once and you can
put a single object into more than one guardian.  The object will then
be returned multiple times by the guardian procedures.

An object is eligible to be returned from a guardian when it is no
longer referenced from outside any guardian.

There is no guarantee about the order in which objects are returned
from a guardian.  If you want to impose an order on finalization
actions, for example, you can do that by keeping objects alive in some
global data structure until they are no longer needed for finalizing
other objects.

Being an element in a weak vector, a key in a hash table with weak
keys, or a value in a hash table with weak value does not prevent an
object from being returned by a guardian.  But as long as an object
can be returned from a guardian it will not be removed from such a
weak vector or hash table.  In other words, a weak link does not
prevent an object from being considered collectable, but being inside
a guardian prevents a weak link from being broken.

A key in a weak key hash table can be though of as having a strong
reference to its associated value as long as the key is accessible.
Consequently, when the key only accessible from within a guardian, the
reference from the key to the value is also considered to be coming
from within a guardian.  Thus, if there is no other reference to the
value, it is eligible to be returned from a guardian.

@end deffn

hashq
@c snarfed from hash.c:377
@deffn {Scheme Procedure} hashq key size
Determine a hash value for @var{key} that is suitable for
lookups in a hashtable of size @var{size}, where @code{eq?} is
used as the equality predicate.  The function returns an
integer in the range 0 to @var{size} - 1.  Note that
@code{hashq} may use internal addresses.  Thus two calls to
hashq where the keys are @code{eq?} are not guaranteed to
deliver the same value if the key object gets garbage collected
in between.  This can happen, for example with symbols:
@code{(hashq 'foo n) (gc) (hashq 'foo n)} may produce two
different values, since @code{foo} will be garbage collected.
@end deffn

hashv
@c snarfed from hash.c:410
@deffn {Scheme Procedure} hashv key size
Determine a hash value for @var{key} that is suitable for
lookups in a hashtable of size @var{size}, where @code{eqv?} is
used as the equality predicate.  The function returns an
integer in the range 0 to @var{size} - 1.  Note that
@code{(hashv key)} may use internal addresses.  Thus two calls
to hashv where the keys are @code{eqv?} are not guaranteed to
deliver the same value if the key object gets garbage collected
in between.  This can happen, for example with symbols:
@code{(hashv 'foo n) (gc) (hashv 'foo n)} may produce two
different values, since @code{foo} will be garbage collected.
@end deffn

hash
@c snarfed from hash.c:439
@deffn {Scheme Procedure} hash key size
Determine a hash value for @var{key} that is suitable for
lookups in a hashtable of size @var{size}, where @code{equal?}
is used as the equality predicate.  The function returns an
integer in the range 0 to @var{size} - 1.
@end deffn

make-hash-table
@c snarfed from hashtab.c:193
@deffn {Scheme Procedure} make-hash-table [n]
Make a new abstract hash table object with minimum number of buckets @var{n}

@end deffn

hash-table?
@c snarfed from hashtab.c:204
@deffn {Scheme Procedure} hash-table? obj
Return @code{#t} if @var{obj} is an abstract hash table object.
@end deffn

hash-clear!
@c snarfed from hashtab.c:359
@deffn {Scheme Procedure} hash-clear! table
Remove all items from @var{table} (without triggering a resize).
@end deffn

hashq-get-handle
@c snarfed from hashtab.c:381
@deffn {Scheme Procedure} hashq-get-handle table key
This procedure returns the @code{(key . value)} pair from the
hash table @var{table}.  If @var{table} does not hold an
associated value for @var{key}, @code{#f} is returned.
Uses @code{eq?} for equality testing.
@end deffn

hashq-create-handle!
@c snarfed from hashtab.c:397
@deffn {Scheme Procedure} hashq-create-handle! table key init
This function looks up @var{key} in @var{table} and returns its handle.
If @var{key} is not already present, a new handle is created which
associates @var{key} with @var{init}.
@end deffn

hashq-ref
@c snarfed from hashtab.c:412
@deffn {Scheme Procedure} hashq-ref table key [dflt]
Look up @var{key} in the hash table @var{table}, and return the
value (if any) associated with it.  If @var{key} is not found,
return @var{dflt} (or @code{#f} if no @var{dflt} argument
is supplied).  Uses @code{eq?} for equality testing.
@end deffn

hashq-set!
@c snarfed from hashtab.c:435
@deffn {Scheme Procedure} hashq-set! table key val
Find the entry in @var{table} associated with @var{key}, and
store @var{val} there. Uses @code{eq?} for equality testing.
@end deffn

hashq-remove!
@c snarfed from hashtab.c:456
@deffn {Scheme Procedure} hashq-remove! table key
Remove @var{key} (and any value associated with it) from
@var{table}.  Uses @code{eq?} for equality tests.
@end deffn

hashv-get-handle
@c snarfed from hashtab.c:482
@deffn {Scheme Procedure} hashv-get-handle table key
This procedure returns the @code{(key . value)} pair from the
hash table @var{table}.  If @var{table} does not hold an
associated value for @var{key}, @code{#f} is returned.
Uses @code{eqv?} for equality testing.
@end deffn

hashv-create-handle!
@c snarfed from hashtab.c:498
@deffn {Scheme Procedure} hashv-create-handle! table key init
This function looks up @var{key} in @var{table} and returns its handle.
If @var{key} is not already present, a new handle is created which
associates @var{key} with @var{init}.
@end deffn

hashv-ref
@c snarfed from hashtab.c:519
@deffn {Scheme Procedure} hashv-ref table key [dflt]
Look up @var{key} in the hash table @var{table}, and return the
value (if any) associated with it.  If @var{key} is not found,
return @var{dflt} (or @code{#f} if no @var{dflt} argument
is supplied).  Uses @code{eqv?} for equality testing.
@end deffn

hashv-set!
@c snarfed from hashtab.c:544
@deffn {Scheme Procedure} hashv-set! table key val
Find the entry in @var{table} associated with @var{key}, and
store @var{value} there. Uses @code{eqv?} for equality testing.
@end deffn

hashv-remove!
@c snarfed from hashtab.c:566
@deffn {Scheme Procedure} hashv-remove! table key
Remove @var{key} (and any value associated with it) from
@var{table}.  Uses @code{eqv?} for equality tests.
@end deffn

hash-get-handle
@c snarfed from hashtab.c:589
@deffn {Scheme Procedure} hash-get-handle table key
This procedure returns the @code{(key . value)} pair from the
hash table @var{table}.  If @var{table} does not hold an
associated value for @var{key}, @code{#f} is returned.
Uses @code{equal?} for equality testing.
@end deffn

hash-create-handle!
@c snarfed from hashtab.c:605
@deffn {Scheme Procedure} hash-create-handle! table key init
This function looks up @var{key} in @var{table} and returns its handle.
If @var{key} is not already present, a new handle is created which
associates @var{key} with @var{init}.
@end deffn

hash-ref
@c snarfed from hashtab.c:626
@deffn {Scheme Procedure} hash-ref table key [dflt]
Look up @var{key} in the hash table @var{table}, and return the
value (if any) associated with it.  If @var{key} is not found,
return @var{dflt} (or @code{#f} if no @var{dflt} argument
is supplied).  Uses @code{equal?} for equality testing.
@end deffn

hash-set!
@c snarfed from hashtab.c:651
@deffn {Scheme Procedure} hash-set! table key val
Find the entry in @var{table} associated with @var{key}, and
store @var{val} there. Uses @code{equal?} for equality
testing.
@end deffn

hash-remove!
@c snarfed from hashtab.c:675
@deffn {Scheme Procedure} hash-remove! table key
Remove @var{key} (and any value associated with it) from
@var{table}.  Uses @code{equal?} for equality tests.
@end deffn

hashx-get-handle
@c snarfed from hashtab.c:737
@deffn {Scheme Procedure} hashx-get-handle hash assoc table key
This behaves the same way as the corresponding
@code{-get-handle} function, but uses @var{hash} as a hash
function and @var{assoc} to compare keys.  @code{hash} must be
a function that takes two arguments, a key to be hashed and a
table size.  @code{assoc} must be an associator function, like
@code{assoc}, @code{assq} or @code{assv}.
@end deffn

hashx-create-handle!
@c snarfed from hashtab.c:758
@deffn {Scheme Procedure} hashx-create-handle! hash assoc table key init
This behaves the same way as the corresponding
@code{-create-handle} function, but uses @var{hash} as a hash
function and @var{assoc} to compare keys.  @code{hash} must be
a function that takes two arguments, a key to be hashed and a
table size.  @code{assoc} must be an associator function, like
@code{assoc}, @code{assq} or @code{assv}.
@end deffn

hashx-ref
@c snarfed from hashtab.c:780
@deffn {Scheme Procedure} hashx-ref hash assoc table key [dflt]
This behaves the same way as the corresponding @code{ref}
function, but uses @var{hash} as a hash function and
@var{assoc} to compare keys.  @code{hash} must be a function
that takes two arguments, a key to be hashed and a table size.
@code{assoc} must be an associator function, like @code{assoc},
@code{assq} or @code{assv}.

By way of illustration, @code{hashq-ref table key} is
equivalent to @code{hashx-ref hashq assq table key}.
@end deffn

hashx-set!
@c snarfed from hashtab.c:815
@deffn {Scheme Procedure} hashx-set! hash assoc table key val
This behaves the same way as the corresponding @code{set!}
function, but uses @var{hash} as a hash function and
@var{assoc} to compare keys.  @code{hash} must be a function
that takes two arguments, a key to be hashed and a table size.
@code{assoc} must be an associator function, like @code{assoc},
@code{assq} or @code{assv}.

 By way of illustration, @code{hashq-set! table key} is
equivalent to @code{hashx-set!  hashq assq table key}.
@end deffn

hashx-remove!
@c snarfed from hashtab.c:846
@deffn {Scheme Procedure} hashx-remove! hash assoc table obj
This behaves the same way as the corresponding @code{remove!}
function, but uses @var{hash} as a hash function and
@var{assoc} to compare keys.  @code{hash} must be a function
that takes two arguments, a key to be hashed and a table size.
@code{assoc} must be an associator function, like @code{assoc},
@code{assq} or @code{assv}.

 By way of illustration, @code{hashq-remove! table key} is
equivalent to @code{hashx-remove!  hashq assq #f table key}.
@end deffn

hash-fold
@c snarfed from hashtab.c:880
@deffn {Scheme Procedure} hash-fold proc init table
An iterator over hash-table elements.
Accumulates and returns a result by applying PROC successively.
The arguments to PROC are "(key value prior-result)" where key
and value are successive pairs from the hash table TABLE, and
prior-result is either INIT (for the first application of PROC)
or the return value of the previous application of PROC.
For example, @code{(hash-fold acons '() tab)} will convert a hash
table into an a-list of key-value pairs.
@end deffn

hash-for-each
@c snarfed from hashtab.c:909
@deffn {Scheme Procedure} hash-for-each proc table
An iterator over hash-table elements.
Applies PROC successively on all hash table items.
The arguments to PROC are "(key value)" where key
and value are successive pairs from the hash table TABLE.
@end deffn

hash-for-each-handle
@c snarfed from hashtab.c:934
@deffn {Scheme Procedure} hash-for-each-handle proc table
An iterator over hash-table elements.
Applies PROC successively on all hash table handles.
@end deffn

hash-map->list
@c snarfed from hashtab.c:956
@deffn {Scheme Procedure} hash-map->list proc table
An iterator over hash-table elements.
Accumulates and returns as a list the results of applying PROC successively.
The arguments to PROC are "(key value)" where key
and value are successive pairs from the hash table TABLE.
@end deffn

hash-count
@c snarfed from hashtab.c:986
@deffn {Scheme Procedure} hash-count pred table
Return the number of elements in the given hash TABLE that
cause `(PRED KEY VALUE)' to return true.  To quickly determine
the total number of elements, use `(const #t)' for PRED.
@end deffn

make-hook
@c snarfed from hooks.c:81
@deffn {Scheme Procedure} make-hook [n_args]
Create a hook for storing procedure of arity @var{n_args}.
@var{n_args} defaults to zero.  The returned value is a hook
object to be used with the other hook procedures.
@end deffn

hook?
@c snarfed from hooks.c:100
@deffn {Scheme Procedure} hook? x
Return @code{#t} if @var{x} is a hook, @code{#f} otherwise.
@end deffn

hook-empty?
@c snarfed from hooks.c:110
@deffn {Scheme Procedure} hook-empty? hook
Return @code{#t} if @var{hook} is an empty hook, @code{#f}
otherwise.
@end deffn

add-hook!
@c snarfed from hooks.c:122
@deffn {Scheme Procedure} add-hook! hook proc [append_p]
Add the procedure @var{proc} to the hook @var{hook}. The
procedure is added to the end if @var{append_p} is true,
otherwise it is added to the front.  The return value of this
procedure is not specified.
@end deffn

remove-hook!
@c snarfed from hooks.c:148
@deffn {Scheme Procedure} remove-hook! hook proc
Remove the procedure @var{proc} from the hook @var{hook}.  The
return value of this procedure is not specified.
@end deffn

reset-hook!
@c snarfed from hooks.c:162
@deffn {Scheme Procedure} reset-hook! hook
Remove all procedures from the hook @var{hook}.  The return
value of this procedure is not specified.
@end deffn

run-hook
@c snarfed from hooks.c:175
@deffn {Scheme Procedure} run-hook hook . args
Apply all procedures from the hook @var{hook} to the arguments
@var{args}.  The order of the procedure application is first to
last.  The return value of this procedure is not specified.
@end deffn

hook->list
@c snarfed from hooks.c:215
@deffn {Scheme Procedure} hook->list hook
Convert the procedure list of @var{hook} to a list.
@end deffn

make-locale
@c snarfed from i18n.c:623
@deffn {Scheme Procedure} make-locale category_list locale_name [base_locale]
Return a reference to a data structure representing a set of locale datasets.  @var{category_list} should be either a list of locale categories or a single category as used with @code{setlocale} (@pxref{Locales, @code{setlocale}}) and @var{locale_name} should be the name of the locale considered (e.g., @code{"sl_SI"}).  Optionally, if @code{base_locale} is passed, it should be a locale object denoting settings for categories not listed in @var{category_list}.
@end deffn

locale?
@c snarfed from i18n.c:734
@deffn {Scheme Procedure} locale? obj
Return true if @var{obj} is a locale object.
@end deffn

string-locale<?
@c snarfed from i18n.c:883
@deffn {Scheme Procedure} string-locale<? s1 s2 [locale]
Compare strings @var{s1} and @var{s2} in a locale-dependent way.If @var{locale} is provided, it should be locale object (as returned by @code{make-locale}) and will be used to perform the comparison; otherwise, the current system locale is used.
@end deffn

string-locale>?
@c snarfed from i18n.c:902
@deffn {Scheme Procedure} string-locale>? s1 s2 [locale]
Compare strings @var{s1} and @var{s2} in a locale-dependent way.If @var{locale} is provided, it should be locale object (as returned by @code{make-locale}) and will be used to perform the comparison; otherwise, the current system locale is used.
@end deffn

string-locale-ci<?
@c snarfed from i18n.c:921
@deffn {Scheme Procedure} string-locale-ci<? s1 s2 [locale]
Compare strings @var{s1} and @var{s2} in a case-insensitive, and locale-dependent way.  If @var{locale} is provided, it should be locale object (as returned by @code{make-locale}) and will be used to perform the comparison; otherwise, the current system locale is used.
@end deffn

string-locale-ci>?
@c snarfed from i18n.c:941
@deffn {Scheme Procedure} string-locale-ci>? s1 s2 [locale]
Compare strings @var{s1} and @var{s2} in a case-insensitive, and locale-dependent way.  If @var{locale} is provided, it should be locale object (as returned by @code{make-locale}) and will be used to perform the comparison; otherwise, the current system locale is used.
@end deffn

string-locale-ci=?
@c snarfed from i18n.c:961
@deffn {Scheme Procedure} string-locale-ci=? s1 s2 [locale]
Compare strings @var{s1} and @var{s2} in a case-insensitive, and locale-dependent way.  If @var{locale} is provided, it should be locale object (as returned by @code{make-locale}) and will be used to perform the comparison; otherwise, the current system locale is used.
@end deffn

char-locale<?
@c snarfed from i18n.c:982
@deffn {Scheme Procedure} char-locale<? c1 c2 [locale]
Return true if character @var{c1} is lower than @var{c2} according to @var{locale} or to the current locale.
@end deffn

char-locale>?
@c snarfed from i18n.c:1001
@deffn {Scheme Procedure} char-locale>? c1 c2 [locale]
Return true if character @var{c1} is greater than @var{c2} according to @var{locale} or to the current locale.
@end deffn

char-locale-ci<?
@c snarfed from i18n.c:1020
@deffn {Scheme Procedure} char-locale-ci<? c1 c2 [locale]
Return true if character @var{c1} is lower than @var{c2}, in a case insensitive way according to @var{locale} or to the current locale.
@end deffn

char-locale-ci>?
@c snarfed from i18n.c:1040
@deffn {Scheme Procedure} char-locale-ci>? c1 c2 [locale]
Return true if character @var{c1} is greater than @var{c2}, in a case insensitive way according to @var{locale} or to the current locale.
@end deffn

char-locale-ci=?
@c snarfed from i18n.c:1060
@deffn {Scheme Procedure} char-locale-ci=? c1 c2 [locale]
Return true if character @var{c1} is equal to @var{c2}, in a case insensitive way according to @var{locale} or to the current locale.
@end deffn

char-locale-downcase
@c snarfed from i18n.c:1153
@deffn {Scheme Procedure} char-locale-downcase chr [locale]
Return the lowercase character that corresponds to @var{chr} according to either @var{locale} or the current locale.
@end deffn

char-locale-upcase
@c snarfed from i18n.c:1177
@deffn {Scheme Procedure} char-locale-upcase chr [locale]
Return the uppercase character that corresponds to @var{chr} according to either @var{locale} or the current locale.
@end deffn

char-locale-titlecase
@c snarfed from i18n.c:1201
@deffn {Scheme Procedure} char-locale-titlecase chr [locale]
Return the titlecase character that corresponds to @var{chr} according to either @var{locale} or the current locale.
@end deffn

string-locale-upcase
@c snarfed from i18n.c:1274
@deffn {Scheme Procedure} string-locale-upcase str [locale]
Return a new string that is the uppercase version of @var{str} according to either @var{locale} or the current locale.
@end deffn

string-locale-downcase
@c snarfed from i18n.c:1299
@deffn {Scheme Procedure} string-locale-downcase str [locale]
Return a new string that is the down-case version of @var{str} according to either @var{locale} or the current locale.
@end deffn

string-locale-titlecase
@c snarfed from i18n.c:1324
@deffn {Scheme Procedure} string-locale-titlecase str [locale]
Return a new string that is the title-case version of @var{str} according to either @var{locale} or the current locale.
@end deffn

locale-string->integer
@c snarfed from i18n.c:1358
@deffn {Scheme Procedure} locale-string->integer str [base [locale]]
Convert string @var{str} into an integer according to either @var{locale} (a locale object as returned by @code{make-locale}) or the current process locale.  Return two values: an integer (on success) or @code{#f}, and the number of characters read from @var{str} (@code{0} on failure).
@end deffn

locale-string->inexact
@c snarfed from i18n.c:1407
@deffn {Scheme Procedure} locale-string->inexact str [locale]
Convert string @var{str} into an inexact number according to either @var{locale} (a locale object as returned by @code{make-locale}) or the current process locale.  Return two values: an inexact number (on success) or @code{#f}, and the number of characters read from @var{str} (@code{0} on failure).
@end deffn

nl-langinfo
@c snarfed from i18n.c:1487
@deffn {Scheme Procedure} nl-langinfo item [locale]
Return a string denoting locale information for @var{item} in the current locale or that specified by @var{locale}.  The semantics and arguments are the same as those of the X/Open @code{nl_langinfo} function (@pxref{The Elegant and Fast Way, @code{nl_langinfo},, libc, The GNU C Library Reference Manual}).
@end deffn

ftell
@c snarfed from ioext.c:58
@deffn {Scheme Procedure} ftell fd_port
Return an integer representing the current position of
@var{fd_port}, measured from the beginning.  Equivalent to:

@lisp
(seek port 0 SEEK_CUR)
@end lisp
@end deffn

redirect-port
@c snarfed from ioext.c:72
@deffn {Scheme Procedure} redirect-port old new
This procedure takes two ports and duplicates the underlying file
descriptor from @var{old} into @var{new}.  The
current file descriptor in @var{new} will be closed.
After the redirection the two ports will share a file position
and file status flags.

The return value is unspecified.

Unexpected behavior can result if both ports are subsequently used
and the original and/or duplicate ports are buffered.

This procedure does not have any side effects on other ports or
revealed counts.
@end deffn

dup->fdes
@c snarfed from ioext.c:121
@deffn {Scheme Procedure} dup->fdes fd_or_port [fd]
Return a new integer file descriptor referring to the open file
designated by @var{fd_or_port}, which must be either an open
file port or a file descriptor.
@end deffn

dup2
@c snarfed from ioext.c:163
@deffn {Scheme Procedure} dup2 oldfd newfd
A simple wrapper for the @code{dup2} system call.
Copies the file descriptor @var{oldfd} to descriptor
number @var{newfd}, replacing the previous meaning
of @var{newfd}.  Both @var{oldfd} and @var{newfd} must
be integers.
Unlike for dup->fdes or primitive-move->fdes, no attempt
is made to move away ports which are using @var{newfd}.
The return value is unspecified.
@end deffn

fileno
@c snarfed from ioext.c:188
@deffn {Scheme Procedure} fileno port
Return the integer file descriptor underlying @var{port}.  Does
not change its revealed count.
@end deffn

isatty?
@c snarfed from ioext.c:208
@deffn {Scheme Procedure} isatty? port
Return @code{#t} if @var{port} is using a serial non--file
device, otherwise @code{#f}.
@end deffn

fdopen
@c snarfed from ioext.c:228
@deffn {Scheme Procedure} fdopen fdes modes
Return a new port based on the file descriptor @var{fdes}.
Modes are given by the string @var{modes}.  The revealed count
of the port is initialized to zero.  The modes string is the
same as that accepted by @ref{File Ports, open-file}.
@end deffn

primitive-move->fdes
@c snarfed from ioext.c:249
@deffn {Scheme Procedure} primitive-move->fdes port fd
Moves the underlying file descriptor for @var{port} to the integer
value @var{fd} without changing the revealed count of @var{port}.
Any other ports already using this descriptor will be automatically
shifted to new descriptors and their revealed counts reset to zero.
The return value is @code{#f} if the file descriptor already had the
required value or @code{#t} if it was moved.
@end deffn

fdes->ports
@c snarfed from ioext.c:297
@deffn {Scheme Procedure} fdes->ports fd
Return a list of existing ports which have @var{fd} as an
underlying file descriptor, without changing their revealed
counts.
@end deffn

keyword?
@c snarfed from keywords.c:49
@deffn {Scheme Procedure} keyword? obj
Return @code{#t} if the argument @var{obj} is a keyword, else
@code{#f}.
@end deffn

symbol->keyword
@c snarfed from keywords.c:59
@deffn {Scheme Procedure} symbol->keyword symbol
Return the keyword with the same name as @var{symbol}.
@end deffn

keyword->symbol
@c snarfed from keywords.c:83
@deffn {Scheme Procedure} keyword->symbol keyword
Return the symbol with the same name as @var{keyword}.
@end deffn

make-list
@c snarfed from list.c:106
@deffn {Scheme Procedure} make-list n [init]
Create a list containing of @var{n} elements, where each
element is initialized to @var{init}.  @var{init} defaults to
the empty list @code{()} if not given.
@end deffn

cons*
@c snarfed from list.c:127
@deffn {Scheme Procedure} cons* arg . rest
Like @code{list}, but the last arg provides the tail of the
constructed list, returning @code{(cons @var{arg1} (cons
@var{arg2} (cons @dots{} @var{argn})))}.  Requires at least one
argument.  If given one argument, that argument is returned as
result.  This function is called @code{list*} in some other
Schemes and in Common LISP.
@end deffn

null?
@c snarfed from list.c:158
@deffn {Scheme Procedure} null? x
Return @code{#t} iff @var{x} is the empty list, else @code{#f}.
@end deffn

list?
@c snarfed from list.c:168
@deffn {Scheme Procedure} list? x
Return @code{#t} iff @var{x} is a proper list, else @code{#f}.
@end deffn

length
@c snarfed from list.c:210
@deffn {Scheme Procedure} length lst
Return the number of elements in list @var{lst}.
@end deffn

append
@c snarfed from list.c:225
@deffn {Scheme Procedure} append . args
Return a list consisting of the elements of the lists passed as
arguments.
@lisp
(append '(x) '(y))          @result{}  (x y)
(append '(a) '(b c d))      @result{}  (a b c d)
(append '(a (b)) '((c)))    @result{}  (a (b) (c))
@end lisp
The resulting list is always newly allocated, except that it
shares structure with the last list argument.  The last
argument may actually be any object; an improper list results
if the last argument is not a proper list.
@lisp
(append '(a b) '(c . d))    @result{}  (a b c . d)
(append '() 'a)             @result{}  a
@end lisp
@end deffn

append!
@c snarfed from list.c:271
@deffn {Scheme Procedure} append! . args
A destructive version of @code{append} (@pxref{Pairs and
Lists,,,r5rs, The Revised^5 Report on Scheme}).  The cdr field
of each list's final pair is changed to point to the head of
the next list, so no consing is performed.  Return
the mutated list.
@end deffn

last-pair
@c snarfed from list.c:309
@deffn {Scheme Procedure} last-pair lst
Return the last pair in @var{lst}, signaling an error if
@var{lst} is circular.
@end deffn

reverse
@c snarfed from list.c:339
@deffn {Scheme Procedure} reverse lst
Return a new list that contains the elements of @var{lst} but
in reverse order.
@end deffn

reverse!
@c snarfed from list.c:365
@deffn {Scheme Procedure} reverse! lst [new_tail]
A destructive version of @code{reverse} (@pxref{Pairs and Lists,,,r5rs,
The Revised^5 Report on Scheme}).  The cdr of each cell in @var{lst} is
modified to point to the previous list element.  Return the
reversed list.

Caveat: because the list is modified in place, the tail of the original
list now becomes its head, and the head of the original list now becomes
the tail.  Therefore, the @var{lst} symbol to which the head of the
original list was bound now points to the tail.  To ensure that the head
of the modified list is not lost, it is wise to save the return value of
@code{reverse!}
@end deffn

list-ref
@c snarfed from list.c:429
@deffn {Scheme Procedure} list-ref list k
Return the @var{k}th element from @var{list}.
@end deffn

list-set!
@c snarfed from list.c:453
@deffn {Scheme Procedure} list-set! list k val
Set the @var{k}th element of @var{list} to @var{val}.
@end deffn

list-cdr-ref
@c snarfed from list.c:477
@deffn {Scheme Procedure} list-cdr-ref
implemented by the C function "scm_list_tail"
@end deffn

list-tail
@c snarfed from list.c:479
@deffn {Scheme Procedure} list-tail lst k
@deffnx {Scheme Procedure} list-cdr-ref lst k
Return the "tail" of @var{lst} beginning with its @var{k}th element.
The first element of the list is considered to be element 0.

@code{list-tail} and @code{list-cdr-ref} are identical.  It may help to
think of @code{list-cdr-ref} as accessing the @var{k}th cdr of the list,
or returning the results of cdring @var{k} times down @var{lst}.
@end deffn

list-cdr-set!
@c snarfed from list.c:499
@deffn {Scheme Procedure} list-cdr-set! list k val
Set the @var{k}th cdr of @var{list} to @var{val}.
@end deffn

list-head
@c snarfed from list.c:526
@deffn {Scheme Procedure} list-head lst k
Copy the first @var{k} elements from @var{lst} into a new list, and
return it.
@end deffn

list-copy
@c snarfed from list.c:578
@deffn {Scheme Procedure} list-copy lst
Return a (newly-created) copy of @var{lst}.
@end deffn

list
@c snarfed from list.c:607
@deffn {Scheme Procedure} list . objs
Return a list containing @var{objs}, the arguments to
@code{list}.
@end deffn

memq
@c snarfed from list.c:644
@deffn {Scheme Procedure} memq x lst
Return the first sublist of @var{lst} whose car is @code{eq?}
to @var{x} where the sublists of @var{lst} are the non-empty
lists returned by @code{(list-tail @var{lst} @var{k})} for
@var{k} less than the length of @var{lst}.  If @var{x} does not
occur in @var{lst}, then @code{#f} (not the empty list) is
returned.
@end deffn

memv
@c snarfed from list.c:684
@deffn {Scheme Procedure} memv x lst
Return the first sublist of @var{lst} whose car is @code{eqv?}
to @var{x} where the sublists of @var{lst} are the non-empty
lists returned by @code{(list-tail @var{lst} @var{k})} for
@var{k} less than the length of @var{lst}.  If @var{x} does not
occur in @var{lst}, then @code{#f} (not the empty list) is
returned.
@end deffn

member
@c snarfed from list.c:724
@deffn {Scheme Procedure} member x lst
Return the first sublist of @var{lst} whose car is
@code{equal?} to @var{x} where the sublists of @var{lst} are
the non-empty lists returned by @code{(list-tail @var{lst}
@var{k})} for @var{k} less than the length of @var{lst}.  If
@var{x} does not occur in @var{lst}, then @code{#f} (not the
empty list) is returned.
@end deffn

delq!
@c snarfed from list.c:747
@deffn {Scheme Procedure} delq! item lst
@deffnx {Scheme Procedure} delv! item lst
@deffnx {Scheme Procedure} delete! item lst
These procedures are destructive versions of @code{delq}, @code{delv}
and @code{delete}: they modify the existing @var{lst}
rather than creating a new list.  Caveat evaluator: Like other
destructive list functions, these functions cannot modify the binding of
@var{lst}, and so cannot be used to delete the first element of
@var{lst} destructively.
@end deffn

delv!
@c snarfed from list.c:777
@deffn {Scheme Procedure} delv! item lst
Destructively remove all elements from @var{lst} that are
@code{eqv?} to @var{item}.
@end deffn

delete!
@c snarfed from list.c:802
@deffn {Scheme Procedure} delete! item lst
Destructively remove all elements from @var{lst} that are
@code{equal?} to @var{item}.
@end deffn

delq
@c snarfed from list.c:829
@deffn {Scheme Procedure} delq item lst
Return a newly-created copy of @var{lst} with elements
@code{eq?} to @var{item} removed.  This procedure mirrors
@code{memq}: @code{delq} compares elements of @var{lst} against
@var{item} with @code{eq?}.
@end deffn

delv
@c snarfed from list.c:842
@deffn {Scheme Procedure} delv item lst
Return a newly-created copy of @var{lst} with elements
@code{eqv?}  to @var{item} removed.  This procedure mirrors
@code{memv}: @code{delv} compares elements of @var{lst} against
@var{item} with @code{eqv?}.
@end deffn

delete
@c snarfed from list.c:855
@deffn {Scheme Procedure} delete item lst
Return a newly-created copy of @var{lst} with elements
@code{equal?}  to @var{item} removed.  This procedure mirrors
@code{member}: @code{delete} compares elements of @var{lst}
against @var{item} with @code{equal?}.
@end deffn

delq1!
@c snarfed from list.c:869
@deffn {Scheme Procedure} delq1! item lst
Like @code{delq!}, but only deletes the first occurrence of
@var{item} from @var{lst}.  Tests for equality using
@code{eq?}.  See also @code{delv1!} and @code{delete1!}.
@end deffn

delv1!
@c snarfed from list.c:897
@deffn {Scheme Procedure} delv1! item lst
Like @code{delv!}, but only deletes the first occurrence of
@var{item} from @var{lst}.  Tests for equality using
@code{eqv?}.  See also @code{delq1!} and @code{delete1!}.
@end deffn

delete1!
@c snarfed from list.c:925
@deffn {Scheme Procedure} delete1! item lst
Like @code{delete!}, but only deletes the first occurrence of
@var{item} from @var{lst}.  Tests for equality using
@code{equal?}.  See also @code{delq1!} and @code{delv1!}.
@end deffn

filter
@c snarfed from list.c:952
@deffn {Scheme Procedure} filter pred list
Return all the elements of 2nd arg @var{list} that satisfy predicate @var{pred}.
The list is not disordered -- elements that appear in the result list occur
in the same order as they occur in the argument list. The returned list may
share a common tail with the argument list. The dynamic order in which the
various applications of pred are made is not specified.

@lisp
(filter even? '(0 7 8 8 43 -4)) => (0 8 8 -4)
@end lisp
@end deffn

filter!
@c snarfed from list.c:985
@deffn {Scheme Procedure} filter! pred list
Linear-update variant of @code{filter}.
@end deffn

primitive-load
@c snarfed from load.c:83
@deffn {Scheme Procedure} primitive-load filename
Load the file named @var{filename} and evaluate its contents in
the top-level environment. The load paths are not searched;
@var{filename} must either be a full pathname or be a pathname
relative to the current directory.  If the  variable
@code{%load-hook} is defined, it should be bound to a procedure
that will be called before any code is loaded.  See the
documentation for @code{%load-hook} later in this section.
@end deffn

%package-data-dir
@c snarfed from load.c:150
@deffn {Scheme Procedure} %package-data-dir
Return the name of the directory where Scheme packages, modules and
libraries are kept.  On most Unix systems, this will be
@samp{/usr/local/share/guile}.
@end deffn

%library-dir
@c snarfed from load.c:163
@deffn {Scheme Procedure} %library-dir
Return the directory where the Guile Scheme library files are installed.
E.g., may return "/usr/share/guile/1.3.5".
@end deffn

%site-dir
@c snarfed from load.c:175
@deffn {Scheme Procedure} %site-dir
Return the directory where users should install Scheme code for use
with this version of Guile.

E.g., may return "/usr/share/guile/site/3.0".
@end deffn

%global-site-dir
@c snarfed from load.c:188
@deffn {Scheme Procedure} %global-site-dir
Return the directory where users should install Scheme code for use
with all versions of Guile.

E.g., may return "/usr/share/guile/site".
@end deffn

%site-ccache-dir
@c snarfed from load.c:201
@deffn {Scheme Procedure} %site-ccache-dir
Return the directory where users should install compiled
@code{.go} files for use with this version of Guile.

E.g., may return "/usr/lib/guile/3.0/site-ccache".
@end deffn

parse-path
@c snarfed from load.c:239
@deffn {Scheme Procedure} parse-path path [tail]
Parse @var{path}, which is expected to be a colon-separated
string, into a list and return the resulting list with
@var{tail} appended. If @var{path} is @code{#f}, @var{tail}
is returned.
@end deffn

parse-path-with-ellipsis
@c snarfed from load.c:261
@deffn {Scheme Procedure} parse-path-with-ellipsis path base
Parse @var{path}, which is expected to be a colon-separated
string, into a list and return the resulting list with
@var{base} (a list) spliced in place of the @code{...} path
component, if present, or else @var{base} is added to the end.
If @var{path} is @code{#f}, @var{base} is returned.
@end deffn

search-path
@c snarfed from load.c:925
@deffn {Scheme Procedure} search-path path filename . rest
Search @var{path} for a directory containing a file named
@var{filename}. The file must be readable, and not a directory.
If we find one, return its full filename; otherwise, return
@code{#f}.  If @var{filename} is absolute, return it unchanged.
If given, @var{rest} is a list of extension strings; for each
directory in @var{path}, we search for @var{filename}
concatenated with each extension.
@end deffn

%search-load-path
@c snarfed from load.c:987
@deffn {Scheme Procedure} %search-load-path filename
Search @var{%load-path} for the file named @var{filename},
which must be readable by the current user.  If @var{filename}
is found in the list of paths to search or is an absolute
pathname, return its full pathname.  Otherwise, return
@code{#f}.  Filenames may have any of the optional extensions
in the @code{%load-extensions} list; @code{%search-load-path}
will try each extension automatically.
@end deffn

%warn-auto-compilation-enabled
@c snarfed from load.c:1092
@deffn {Scheme Procedure} %warn-auto-compilation-enabled

@end deffn

primitive-load-path
@c snarfed from load.c:1157
@deffn {Scheme Procedure} primitive-load-path . args
Search @var{%load-path} for the file named @var{filename} and
load it into the top-level environment.

If @var{filename} is a relative pathname and is not found in
the list of search paths, one of three things may happen,
depending on the optional second argument,
@var{exception_on_not_found}.  If it is @code{#f}, @code{#f}
will be returned.  If it is a procedure, it will be called
with no arguments.  Otherwise an error is signaled.
@end deffn

make-syntax-transformer
@c snarfed from macros.c:88
@deffn {Scheme Procedure} make-syntax-transformer name type binding
Construct a @dfn{syntax transformer}.

This function is part of Guile's low-level support for the psyntax
syntax expander. Users should not call this function.
@end deffn

macro?
@c snarfed from macros.c:122
@deffn {Scheme Procedure} macro? obj
Return @code{#t} if @var{obj} is a syntax transformer (an object that transforms Scheme expressions at expansion-time).

Macros are actually just one kind of syntax transformer; this
procedure has its name due to historical reasons.
@end deffn

macro-type
@c snarfed from macros.c:134
@deffn {Scheme Procedure} macro-type m
Return the type of the syntax transformer @var{m}, as passed to
@code{make-syntax-transformer}. If @var{m} is a primitive syntax
transformer, @code{#f} will be returned.
@end deffn

macro-name
@c snarfed from macros.c:146
@deffn {Scheme Procedure} macro-name m
Return the name of the syntax transformer @var{m}.
@end deffn

macro-transformer
@c snarfed from macros.c:156
@deffn {Scheme Procedure} macro-transformer m
Return the transformer procedure of the macro @var{m}.

If @var{m} is a syntax transformer but not a macro, @code{#f}
will be returned. (This can happen, for example, with primitive
syntax transformers).
@end deffn

macro-binding
@c snarfed from macros.c:175
@deffn {Scheme Procedure} macro-binding m
Return the binding of the syntax transformer @var{m}, as passed to
@code{make-syntax-transformer}. If @var{m} is a primitive syntax
transformer, @code{#f} will be returned.
@end deffn

memoize-expression
@c snarfed from memoize.c:645
@deffn {Scheme Procedure} memoize-expression exp
Memoize the expression @var{exp}.
@end deffn

unmemoize-expression
@c snarfed from memoize.c:812
@deffn {Scheme Procedure} unmemoize-expression m
Unmemoize the memoized expression @var{m}.
@end deffn

memoized-typecode
@c snarfed from memoize.c:821
@deffn {Scheme Procedure} memoized-typecode sym
Return the memoized typecode corresponding to the symbol @var{sym}.
@end deffn

%resolve-variable
@c snarfed from memoize.c:846
@deffn {Scheme Procedure} %resolve-variable loc mod
Look up and return the variable for @var{loc}.
@end deffn

current-module
@c snarfed from modules.c:94
@deffn {Scheme Procedure} current-module
Return the current module.
@end deffn

set-current-module
@c snarfed from modules.c:105
@deffn {Scheme Procedure} set-current-module module
Set the current module to @var{module} and return
the previous current module.
@end deffn

interaction-environment
@c snarfed from modules.c:125
@deffn {Scheme Procedure} interaction-environment
Return a specifier for the environment that contains
implementation--defined bindings, typically a superset of those
listed in the report.  The intent is that this procedure will
return the environment in which the implementation would
evaluate expressions dynamically typed by the user.
@end deffn

module-local-variable
@c snarfed from modules.c:415
@deffn {Scheme Procedure} module-local-variable module sym
Return the variable bound to @var{sym} in @var{module}.  Return @code{#f} is @var{sym} is not bound locally in @var{module}.
@end deffn

module-variable
@c snarfed from modules.c:479
@deffn {Scheme Procedure} module-variable module sym
Return the variable bound to @var{sym} in @var{module}.  This may be both a local variable or an imported variable.  Return @code{#f} is @var{sym} is not bound in @var{module}.
@end deffn

module-transformer
@c snarfed from modules.c:561
@deffn {Scheme Procedure} module-transformer module
Returns the syntax expander for the given module.
@end deffn

module-import-interface
@c snarfed from modules.c:589
@deffn {Scheme Procedure} module-import-interface module sym
Return the module or interface from which @var{sym} is imported in @var{module}.  If @var{sym} is not imported (i.e., it is not defined in @var{module} or it is a module-local binding instead of an imported one), then @code{#f} is returned.
@end deffn

define!
@c snarfed from modules.c:809
@deffn {Scheme Procedure} define! sym value
Define @var{sym} to be @var{value} in the current module.Returns the variable itself. Note that this is a procedure, not a macro.
@end deffn

module-reverse-lookup
@c snarfed from modules.c:822
@deffn {Scheme Procedure} module-reverse-lookup module variable
Return the symbol under which @var{variable} is bound in @var{module} or @var{#f} if @var{variable} is not visible from @var{module}.  If @var{module} is @code{#f}, then the pre-module obarray is used.
@end deffn

%get-pre-modules-obarray
@c snarfed from modules.c:881
@deffn {Scheme Procedure} %get-pre-modules-obarray
Return the obarray that is used for all new bindings before the module system is booted.  The first call to @code{set-current-module} will boot the module system.
@end deffn

exact?
@c snarfed from numbers.c:433
@deffn {Scheme Procedure} exact? x
Return @code{#t} if @var{x} is an exact number, @code{#f}
otherwise.
@end deffn

inexact?
@c snarfed from numbers.c:454
@deffn {Scheme Procedure} inexact? x
Return @code{#t} if @var{x} is an inexact number, @code{#f}
else.
@end deffn

odd?
@c snarfed from numbers.c:475
@deffn {Scheme Procedure} odd? n
Return @code{#t} if @var{n} is an odd number, @code{#f}
otherwise.
@end deffn

even?
@c snarfed from numbers.c:502
@deffn {Scheme Procedure} even? n
Return @code{#t} if @var{n} is an even number, @code{#f}
otherwise.
@end deffn

finite?
@c snarfed from numbers.c:528
@deffn {Scheme Procedure} finite? x
Return @code{#t} if the real number @var{x} is neither
infinite nor a NaN, @code{#f} otherwise.
@end deffn

inf?
@c snarfed from numbers.c:543
@deffn {Scheme Procedure} inf? x
Return @code{#t} if the real number @var{x} is @samp{+inf.0} or
@samp{-inf.0}.  Otherwise return @code{#f}.
@end deffn

nan?
@c snarfed from numbers.c:558
@deffn {Scheme Procedure} nan? x
Return @code{#t} if the real number @var{x} is a NaN,
or @code{#f} otherwise.
@end deffn

inf
@c snarfed from numbers.c:622
@deffn {Scheme Procedure} inf
Return Inf.
@end deffn

nan
@c snarfed from numbers.c:637
@deffn {Scheme Procedure} nan
Return NaN.
@end deffn

abs
@c snarfed from numbers.c:653
@deffn {Scheme Procedure} abs x
Return the absolute value of @var{x}.
@end deffn

quotient
@c snarfed from numbers.c:678
@deffn {Scheme Procedure} quotient x y
Return the quotient of the numbers @var{x} and @var{y}.
@end deffn

remainder
@c snarfed from numbers.c:695
@deffn {Scheme Procedure} remainder x y
Return the remainder of the numbers @var{x} and @var{y}.
@lisp
(remainder 13 4) @result{} 1
(remainder -13 4) @result{} -1
@end lisp
@end deffn

modulo
@c snarfed from numbers.c:717
@deffn {Scheme Procedure} modulo x y
Return the modulo of the numbers @var{x} and @var{y}.
@lisp
(modulo 13 4) @result{} 1
(modulo -13 4) @result{} 3
@end lisp
@end deffn

euclidean-quotient
@c snarfed from numbers.c:795
@deffn {Scheme Procedure} euclidean-quotient x y
Return the integer @var{q} such that
@math{@var{x} = @var{q}*@var{y} + @var{r}}
where @math{0 <= @var{r} < abs(@var{y})}.
@lisp
(euclidean-quotient 123 10) @result{} 12
(euclidean-quotient 123 -10) @result{} -12
(euclidean-quotient -123 10) @result{} -13
(euclidean-quotient -123 -10) @result{} 13
(euclidean-quotient -123.2 -63.5) @result{} 2.0
(euclidean-quotient 16/3 -10/7) @result{} -3
@end lisp
@end deffn

euclidean-remainder
@c snarfed from numbers.c:817
@deffn {Scheme Procedure} euclidean-remainder x y
Return the real number @var{r} such that
@math{0 <= @var{r} < abs(@var{y})} and
@math{@var{x} = @var{q}*@var{y} + @var{r}}
for some integer @var{q}.
@lisp
(euclidean-remainder 123 10) @result{} 3
(euclidean-remainder 123 -10) @result{} 3
(euclidean-remainder -123 10) @result{} 7
(euclidean-remainder -123 -10) @result{} 7
(euclidean-remainder -123.2 -63.5) @result{} 3.8
(euclidean-remainder 16/3 -10/7) @result{} 22/21
@end lisp
@end deffn

euclidean/
@c snarfed from numbers.c:840
@deffn {Scheme Procedure} euclidean/ x y
Return the integer @var{q} and the real number @var{r}
such that @math{@var{x} = @var{q}*@var{y} + @var{r}}
and @math{0 <= @var{r} < abs(@var{y})}.
@lisp
(euclidean/ 123 10) @result{} 12 and 3
(euclidean/ 123 -10) @result{} -12 and 3
(euclidean/ -123 10) @result{} -13 and 7
(euclidean/ -123 -10) @result{} 13 and 7
(euclidean/ -123.2 -63.5) @result{} 2.0 and 3.8
(euclidean/ 16/3 -10/7) @result{} -3 and 22/21
@end lisp
@end deffn

floor-quotient
@c snarfed from numbers.c:874
@deffn {Scheme Procedure} floor-quotient x y
Return the floor of @math{@var{x} / @var{y}}.
@lisp
(floor-quotient 123 10) @result{} 12
(floor-quotient 123 -10) @result{} -13
(floor-quotient -123 10) @result{} -13
(floor-quotient -123 -10) @result{} 12
(floor-quotient -123.2 -63.5) @result{} 1.0
(floor-quotient 16/3 -10/7) @result{} -4
@end lisp
@end deffn

floor-remainder
@c snarfed from numbers.c:963
@deffn {Scheme Procedure} floor-remainder x y
Return the real number @var{r} such that
@math{@var{x} = @var{q}*@var{y} + @var{r}}
where @math{@var{q} = floor(@var{x} / @var{y})}.
@lisp
(floor-remainder 123 10) @result{} 3
(floor-remainder 123 -10) @result{} -7
(floor-remainder -123 10) @result{} 7
(floor-remainder -123 -10) @result{} -3
(floor-remainder -123.2 -63.5) @result{} -59.7
(floor-remainder 16/3 -10/7) @result{} -8/21
@end lisp
@end deffn

floor/
@c snarfed from numbers.c:1068
@deffn {Scheme Procedure} floor/ x y
Return the integer @var{q} and the real number @var{r}
such that @math{@var{x} = @var{q}*@var{y} + @var{r}}
and @math{@var{q} = floor(@var{x} / @var{y})}.
@lisp
(floor/ 123 10) @result{} 12 and 3
(floor/ 123 -10) @result{} -13 and -7
(floor/ -123 10) @result{} -13 and 7
(floor/ -123 -10) @result{} 12 and -3
(floor/ -123.2 -63.5) @result{} 1.0 and -59.7
(floor/ 16/3 -10/7) @result{} -4 and -8/21
@end lisp
@end deffn

ceiling-quotient
@c snarfed from numbers.c:1182
@deffn {Scheme Procedure} ceiling-quotient x y
Return the ceiling of @math{@var{x} / @var{y}}.
@lisp
(ceiling-quotient 123 10) @result{} 13
(ceiling-quotient 123 -10) @result{} -12
(ceiling-quotient -123 10) @result{} -12
(ceiling-quotient -123 -10) @result{} 13
(ceiling-quotient -123.2 -63.5) @result{} 2.0
(ceiling-quotient 16/3 -10/7) @result{} -3
@end lisp
@end deffn

ceiling-remainder
@c snarfed from numbers.c:1272
@deffn {Scheme Procedure} ceiling-remainder x y
Return the real number @var{r} such that
@math{@var{x} = @var{q}*@var{y} + @var{r}}
where @math{@var{q} = ceiling(@var{x} / @var{y})}.
@lisp
(ceiling-remainder 123 10) @result{} -7
(ceiling-remainder 123 -10) @result{} 3
(ceiling-remainder -123 10) @result{} -3
(ceiling-remainder -123 -10) @result{} 7
(ceiling-remainder -123.2 -63.5) @result{} 3.8
(ceiling-remainder 16/3 -10/7) @result{} 22/21
@end lisp
@end deffn

ceiling/
@c snarfed from numbers.c:1380
@deffn {Scheme Procedure} ceiling/ x y
Return the integer @var{q} and the real number @var{r}
such that @math{@var{x} = @var{q}*@var{y} + @var{r}}
and @math{@var{q} = ceiling(@var{x} / @var{y})}.
@lisp
(ceiling/ 123 10) @result{} 13 and -7
(ceiling/ 123 -10) @result{} -12 and 3
(ceiling/ -123 10) @result{} -12 and -3
(ceiling/ -123 -10) @result{} 13 and 7
(ceiling/ -123.2 -63.5) @result{} 2.0 and 3.8
(ceiling/ 16/3 -10/7) @result{} -3 and 22/21
@end lisp
@end deffn

truncate-quotient
@c snarfed from numbers.c:1493
@deffn {Scheme Procedure} truncate-quotient x y
Return @math{@var{x} / @var{y}} rounded toward zero.
@lisp
(truncate-quotient 123 10) @result{} 12
(truncate-quotient 123 -10) @result{} -12
(truncate-quotient -123 10) @result{} -12
(truncate-quotient -123 -10) @result{} 12
(truncate-quotient -123.2 -63.5) @result{} 1.0
(truncate-quotient 16/3 -10/7) @result{} -3
@end lisp
@end deffn

truncate-remainder
@c snarfed from numbers.c:1587
@deffn {Scheme Procedure} truncate-remainder x y
Return the real number @var{r} such that
@math{@var{x} = @var{q}*@var{y} + @var{r}}
where @math{@var{q} = truncate(@var{x} / @var{y})}.
@lisp
(truncate-remainder 123 10) @result{} 3
(truncate-remainder 123 -10) @result{} 3
(truncate-remainder -123 10) @result{} -3
(truncate-remainder -123 -10) @result{} -3
(truncate-remainder -123.2 -63.5) @result{} -59.7
(truncate-remainder 16/3 -10/7) @result{} 22/21
@end lisp
@end deffn

truncate/
@c snarfed from numbers.c:1695
@deffn {Scheme Procedure} truncate/ x y
Return the integer @var{q} and the real number @var{r}
such that @math{@var{x} = @var{q}*@var{y} + @var{r}}
and @math{@var{q} = truncate(@var{x} / @var{y})}.
@lisp
(truncate/ 123 10) @result{} 12 and 3
(truncate/ 123 -10) @result{} -12 and 3
(truncate/ -123 10) @result{} -12 and -3
(truncate/ -123 -10) @result{} 12 and -3
(truncate/ -123.2 -63.5) @result{} 1.0 and -59.7
(truncate/ 16/3 -10/7) @result{} -3 and 22/21
@end lisp
@end deffn

centered-quotient
@c snarfed from numbers.c:1811
@deffn {Scheme Procedure} centered-quotient x y
Return the integer @var{q} such that
@math{@var{x} = @var{q}*@var{y} + @var{r}} where
@math{-abs(@var{y}/2) <= @var{r} < abs(@var{y}/2)}.
@lisp
(centered-quotient 123 10) @result{} 12
(centered-quotient 123 -10) @result{} -12
(centered-quotient -123 10) @result{} -12
(centered-quotient -123 -10) @result{} 12
(centered-quotient -123.2 -63.5) @result{} 2.0
(centered-quotient 16/3 -10/7) @result{} -4
@end lisp
@end deffn

centered-remainder
@c snarfed from numbers.c:1910
@deffn {Scheme Procedure} centered-remainder x y
Return the real number @var{r} such that
@math{-abs(@var{y}/2) <= @var{r} < abs(@var{y}/2)}
and @math{@var{x} = @var{q}*@var{y} + @var{r}}
for some integer @var{q}.
@lisp
(centered-remainder 123 10) @result{} 3
(centered-remainder 123 -10) @result{} 3
(centered-remainder -123 10) @result{} -3
(centered-remainder -123 -10) @result{} -3
(centered-remainder -123.2 -63.5) @result{} 3.8
(centered-remainder 16/3 -10/7) @result{} -8/21
@end lisp
@end deffn

centered/
@c snarfed from numbers.c:2026
@deffn {Scheme Procedure} centered/ x y
Return the integer @var{q} and the real number @var{r}
such that @math{@var{x} = @var{q}*@var{y} + @var{r}}
and @math{-abs(@var{y}/2) <= @var{r} < abs(@var{y}/2)}.
@lisp
(centered/ 123 10) @result{} 12 and 3
(centered/ 123 -10) @result{} -12 and 3
(centered/ -123 10) @result{} -12 and -3
(centered/ -123 -10) @result{} 12 and -3
(centered/ -123.2 -63.5) @result{} 2.0 and 3.8
(centered/ 16/3 -10/7) @result{} -4 and -8/21
@end lisp
@end deffn

round-quotient
@c snarfed from numbers.c:2144
@deffn {Scheme Procedure} round-quotient x y
Return @math{@var{x} / @var{y}} to the nearest integer,
with ties going to the nearest even integer.
@lisp
(round-quotient 123 10) @result{} 12
(round-quotient 123 -10) @result{} -12
(round-quotient -123 10) @result{} -12
(round-quotient -123 -10) @result{} 12
(round-quotient 125 10) @result{} 12
(round-quotient 127 10) @result{} 13
(round-quotient 135 10) @result{} 14
(round-quotient -123.2 -63.5) @result{} 2.0
(round-quotient 16/3 -10/7) @result{} -4
@end lisp
@end deffn

round-remainder
@c snarfed from numbers.c:2238
@deffn {Scheme Procedure} round-remainder x y
Return the real number @var{r} such that
@math{@var{x} = @var{q}*@var{y} + @var{r}}, where
@var{q} is @math{@var{x} / @var{y}} rounded to the
nearest integer, with ties going to the nearest
even integer.
@lisp
(round-remainder 123 10) @result{} 3
(round-remainder 123 -10) @result{} 3
(round-remainder -123 10) @result{} -3
(round-remainder -123 -10) @result{} -3
(round-remainder 125 10) @result{} 5
(round-remainder 127 10) @result{} -3
(round-remainder 135 10) @result{} -5
(round-remainder -123.2 -63.5) @result{} 3.8
(round-remainder 16/3 -10/7) @result{} -8/21
@end lisp
@end deffn

round/
@c snarfed from numbers.c:2349
@deffn {Scheme Procedure} round/ x y
Return the integer @var{q} and the real number @var{r}
such that @math{@var{x} = @var{q}*@var{y} + @var{r}}
and @var{q} is @math{@var{x} / @var{y}} rounded to the
nearest integer, with ties going to the nearest even integer.
@lisp
(round/ 123 10) @result{} 12 and 3
(round/ 123 -10) @result{} -12 and 3
(round/ -123 10) @result{} -12 and -3
(round/ -123 -10) @result{} 12 and -3
(round/ 125 10) @result{} 12 and 5
(round/ 127 10) @result{} 13 and -3
(round/ 135 10) @result{} 14 and -5
(round/ -123.2 -63.5) @result{} 2.0 and 3.8
(round/ 16/3 -10/7) @result{} -4 and -8/21
@end lisp
@end deffn

gcd
@c snarfed from numbers.c:2464
@deffn {Scheme Procedure} gcd [x [y . rest]]
Return the greatest common divisor of all parameter values.
If called without arguments, 0 is returned.
@end deffn

lcm
@c snarfed from numbers.c:2526
@deffn {Scheme Procedure} lcm [x [y . rest]]
Return the least common multiple of the arguments.
If called without arguments, 1 is returned.
@end deffn

logand
@c snarfed from numbers.c:2624
@deffn {Scheme Procedure} logand [x [y . rest]]
Return the bitwise AND of the integer arguments.

@lisp
(logand) @result{} -1
(logand 7) @result{} 7
(logand #b111 #b011 #b001) @result{} 1
@end lisp
@end deffn

logior
@c snarfed from numbers.c:2684
@deffn {Scheme Procedure} logior [x [y . rest]]
Return the bitwise OR of the integer arguments.

@lisp
(logior) @result{} 0
(logior 7) @result{} 7
(logior #b000 #b001 #b011) @result{} 3
@end lisp
@end deffn

logxor
@c snarfed from numbers.c:2742
@deffn {Scheme Procedure} logxor [x [y . rest]]
Return the bitwise XOR of the integer arguments.  A bit is
set in the result if it is set in an odd number of arguments.
@lisp
(logxor) @result{} 0
(logxor 7) @result{} 7
(logxor #b000 #b001 #b011) @result{} 2
(logxor #b000 #b001 #b011 #b011) @result{} 1
@end lisp
@end deffn

logtest
@c snarfed from numbers.c:2802
@deffn {Scheme Procedure} logtest j k
Test whether @var{j} and @var{k} have any 1 bits in common.
This is equivalent to @code{(not (zero? (logand j k)))}, but
without actually calculating the @code{logand}, just testing
for non-zero.

@lisp
(logtest #b0100 #b1011) @result{} #f
(logtest #b0100 #b0111) @result{} #t
@end lisp
@end deffn

logbit?
@c snarfed from numbers.c:2843
@deffn {Scheme Procedure} logbit? index j
Test whether bit number @var{index} in @var{j} is set.
@var{index} starts from 0 for the least significant bit.

@lisp
(logbit? 0 #b1101) @result{} #t
(logbit? 1 #b1101) @result{} #f
(logbit? 2 #b1101) @result{} #t
(logbit? 3 #b1101) @result{} #t
(logbit? 4 #b1101) @result{} #f
@end lisp
@end deffn

lognot
@c snarfed from numbers.c:2870
@deffn {Scheme Procedure} lognot n
Return the integer which is the ones-complement of the integer
argument.

@lisp
(number->string (lognot #b10000000) 2)
   @result{} "-10000001"
(number->string (lognot #b0) 2)
   @result{} "-1"
@end lisp
@end deffn

modulo-expt
@c snarfed from numbers.c:2892
@deffn {Scheme Procedure} modulo-expt n k m
Return @var{n} raised to the integer exponent
@var{k}, modulo @var{m}.

@lisp
(modulo-expt 2 3 5)
   @result{} 3
@end lisp
@end deffn

integer-expt
@c snarfed from numbers.c:2920
@deffn {Scheme Procedure} integer-expt n k
Return @var{n} raised to the power @var{k}.  @var{k} must be an
exact integer, @var{n} can be any number.

Negative @var{k} is supported, and results in
@math{1/@var{n}^abs(@var{k})} in the usual way.
@math{@var{n}^0} is 1, as usual, and that
includes @math{0^0} is 1.

@lisp
(integer-expt 2 5)   @result{} 32
(integer-expt -3 3)  @result{} -27
(integer-expt 5 -3)  @result{} 1/125
(integer-expt 0 0)   @result{} 1
@end lisp
@end deffn

ash
@c snarfed from numbers.c:3074
@deffn {Scheme Procedure} ash n count
Return @math{floor(@var{n} * 2^@var{count})}.
@var{n} and @var{count} must be exact integers.

With @var{n} viewed as an infinite-precision twos-complement
integer, @code{ash} means a left shift introducing zero bits
when @var{count} is positive, or a right shift dropping bits
when @var{count} is negative.  This is an ``arithmetic'' shift.

@lisp
(number->string (ash #b1 3) 2)     @result{} "1000"
(number->string (ash #b1010 -1) 2) @result{} "101"

;; -23 is bits ...11101001, -6 is bits ...111010
(ash -23 -2) @result{} -6
@end lisp
@end deffn

round-ash
@c snarfed from numbers.c:3105
@deffn {Scheme Procedure} round-ash n count
Return @math{round(@var{n} * 2^@var{count})}.
@var{n} and @var{count} must be exact integers.

With @var{n} viewed as an infinite-precision twos-complement
integer, @code{round-ash} means a left shift introducing zero
bits when @var{count} is positive, or a right shift rounding
to the nearest integer (with ties going to the nearest even
integer) when @var{count} is negative.  This is a rounded
``arithmetic'' shift.

@lisp
(number->string (round-ash #b1 3) 2)     @result{} "1000"
(number->string (round-ash #b1010 -1) 2) @result{} "101"
(number->string (round-ash #b1010 -2) 2) @result{} "10"
(number->string (round-ash #b1011 -2) 2) @result{} "11"
(number->string (round-ash #b1101 -2) 2) @result{} "11"
(number->string (round-ash #b1110 -2) 2) @result{} "100"
@end lisp
@end deffn

bit-extract
@c snarfed from numbers.c:3139
@deffn {Scheme Procedure} bit-extract n start end
Return the integer composed of the @var{start} (inclusive)
through @var{end} (exclusive) bits of @var{n}.  The
@var{start}th bit becomes the 0-th bit in the result.

@lisp
(number->string (bit-extract #b1101101010 0 4) 2)
   @result{} "1010"
(number->string (bit-extract #b1101101010 4 9) 2)
   @result{} "10110"
@end lisp
@end deffn

logcount
@c snarfed from numbers.c:3168
@deffn {Scheme Procedure} logcount n
Return the number of bits in integer @var{n}.  If integer is
positive, the 1-bits in its binary representation are counted.
If negative, the 0-bits in its two's-complement binary
representation are counted.  If 0, 0 is returned.

@lisp
(logcount #b10101010)
   @result{} 4
(logcount 0)
   @result{} 0
(logcount -2)
   @result{} 1
@end lisp
@end deffn

integer-length
@c snarfed from numbers.c:3194
@deffn {Scheme Procedure} integer-length n
Return the number of bits necessary to represent @var{n}.

@lisp
(integer-length #b10101010)
   @result{} 8
(integer-length 0)
   @result{} 0
(integer-length #b1111)
   @result{} 4
@end lisp
@end deffn

number->string
@c snarfed from numbers.c:3520
@deffn {Scheme Procedure} number->string n [radix]
Return a string holding the external representation of the
number @var{n} in the given @var{radix}.  If @var{n} is
inexact, a radix of 10 will be used.
@end deffn

string->number
@c snarfed from numbers.c:4293
@deffn {Scheme Procedure} string->number string [radix]
Return a number of the maximally precise representation
expressed by the given @var{string}. @var{radix} must be an
exact integer, either 2, 8, 10, or 16. If supplied, @var{radix}
is a default radix that may be overridden by an explicit radix
prefix in @var{string} (e.g. "#o177"). If @var{radix} is not
supplied, then the default radix is 10. If string is not a
syntactically valid notation for a number, then
@code{string->number} returns @code{#f}.
@end deffn

number?
@c snarfed from numbers.c:4324
@deffn {Scheme Procedure} number? x
Return @code{#t} if @var{x} is a number, @code{#f}
otherwise.
@end deffn

complex?
@c snarfed from numbers.c:4334
@deffn {Scheme Procedure} complex? x
Return @code{#t} if @var{x} is a complex number, @code{#f}
otherwise.  Note that the sets of real, rational and integer
values form subsets of the set of complex numbers, i. e. the
predicate will also be fulfilled if @var{x} is a real,
rational or integer number.
@end deffn

real?
@c snarfed from numbers.c:4348
@deffn {Scheme Procedure} real? x
Return @code{#t} if @var{x} is a real number, @code{#f}
otherwise.  Note that the set of integer values forms a subset of
the set of real numbers, i. e. the predicate will also be
fulfilled if @var{x} is an integer number.
@end deffn

rational?
@c snarfed from numbers.c:4361
@deffn {Scheme Procedure} rational? x
Return @code{#t} if @var{x} is a rational number, @code{#f}
otherwise.  Note that the set of integer values forms a subset of
the set of rational numbers, i. e. the predicate will also be
fulfilled if @var{x} is an integer number.
@end deffn

integer?
@c snarfed from numbers.c:4380
@deffn {Scheme Procedure} integer? x
Return @code{#t} if @var{x} is an integer number,
else return @code{#f}.
@end deffn

exact-integer?
@c snarfed from numbers.c:4390
@deffn {Scheme Procedure} exact-integer? x
Return @code{#t} if @var{x} is an exact integer number,
else return @code{#f}.
@end deffn

=
@c snarfed from numbers.c:4408
@deffn {Scheme Procedure} = [x [y . rest]]
Return @code{#t} if all parameters are numerically equal.
@end deffn

<
@c snarfed from numbers.c:4611
@deffn {Scheme Procedure} < [x [y . rest]]
Return @code{#t} if the list of parameters is monotonically
increasing.
@end deffn

>
@c snarfed from numbers.c:4643
@deffn {Scheme Procedure} > [x [y . rest]]
Return @code{#t} if the list of parameters is monotonically
decreasing.
@end deffn

<=
@c snarfed from numbers.c:4675
@deffn {Scheme Procedure} <= [x [y . rest]]
Return @code{#t} if the list of parameters is monotonically
non-decreasing.
@end deffn

>=
@c snarfed from numbers.c:4708
@deffn {Scheme Procedure} >= [x [y . rest]]
Return @code{#t} if the list of parameters is monotonically
non-increasing.
@end deffn

zero?
@c snarfed from numbers.c:4740
@deffn {Scheme Procedure} zero? z
Return @code{#t} if @var{z} is an exact or inexact number equal to
zero.
@end deffn

positive?
@c snarfed from numbers.c:4763
@deffn {Scheme Procedure} positive? x
Return @code{#t} if @var{x} is an exact or inexact number greater than
zero.
@end deffn

negative?
@c snarfed from numbers.c:4783
@deffn {Scheme Procedure} negative? x
Return @code{#t} if @var{x} is an exact or inexact number less than
zero.
@end deffn

max
@c snarfed from numbers.c:4809
@deffn {Scheme Procedure} max [x [y . rest]]
Return the maximum of all parameter values.
@end deffn

min
@c snarfed from numbers.c:4860
@deffn {Scheme Procedure} min [x [y . rest]]
Return the minimum of all parameter values.
@end deffn

+
@c snarfed from numbers.c:4912
@deffn {Scheme Procedure} + [x [y . rest]]
Return the sum of all parameter values.  Return 0 if called without
any parameters.
@end deffn

1+
@c snarfed from numbers.c:5026
@deffn {Scheme Procedure} 1+ x
Return @math{@var{x}+1}.
@end deffn

-
@c snarfed from numbers.c:5170
@deffn {Scheme Procedure} - [x [y . rest]]
If called with one argument @var{z1}, -@var{z1} returned. Otherwise
the sum of all but the first argument are subtracted from the first
argument.
@end deffn

1-
@c snarfed from numbers.c:5206
@deffn {Scheme Procedure} 1- x
Return @math{@var{x}-1}.
@end deffn

*
@c snarfed from numbers.c:5301
@deffn {Scheme Procedure} * [x [y . rest]]
Return the product of all arguments.  If called without arguments,
1 is returned.
@end deffn

/
@c snarfed from numbers.c:5590
@deffn {Scheme Procedure} / [x [y . rest]]
Divide the first argument by the product of the remaining
arguments.  If called with one argument @var{z1}, 1/@var{z1} is
returned.
@end deffn

truncate
@c snarfed from numbers.c:5678
@deffn {Scheme Procedure} truncate x
Round the number @var{x} towards zero.
@end deffn

round
@c snarfed from numbers.c:5696
@deffn {Scheme Procedure} round x
Round the number @var{x} towards the nearest integer. When it is exactly halfway between two integers, round towards the even one.
@end deffn

floor
@c snarfed from numbers.c:5716
@deffn {Scheme Procedure} floor x
Round the number @var{x} towards minus infinity.
@end deffn

ceiling
@c snarfed from numbers.c:5733
@deffn {Scheme Procedure} ceiling x
Round the number @var{x} towards infinity.
@end deffn

expt
@c snarfed from numbers.c:5750
@deffn {Scheme Procedure} expt x y
Return @var{x} raised to the power of @var{y}.
@end deffn

sin
@c snarfed from numbers.c:5797
@deffn {Scheme Procedure} sin z
Compute the sine of @var{z}.
@end deffn

cos
@c snarfed from numbers.c:5818
@deffn {Scheme Procedure} cos z
Compute the cosine of @var{z}.
@end deffn

tan
@c snarfed from numbers.c:5839
@deffn {Scheme Procedure} tan z
Compute the tangent of @var{z}.
@end deffn

sinh
@c snarfed from numbers.c:5860
@deffn {Scheme Procedure} sinh z
Compute the hyperbolic sine of @var{z}.
@end deffn

cosh
@c snarfed from numbers.c:5881
@deffn {Scheme Procedure} cosh z
Compute the hyperbolic cosine of @var{z}.
@end deffn

tanh
@c snarfed from numbers.c:5902
@deffn {Scheme Procedure} tanh z
Compute the hyperbolic tangent of @var{z}.
@end deffn

asin
@c snarfed from numbers.c:5923
@deffn {Scheme Procedure} asin z
Compute the arc sine of @var{z}.
@end deffn

acos
@c snarfed from numbers.c:5951
@deffn {Scheme Procedure} acos z
Compute the arc cosine of @var{z}.
@end deffn

atan
@c snarfed from numbers.c:5981
@deffn {Scheme Procedure} atan z [y]
With one argument, compute the arc tangent of @var{z}.
If @var{y} is present, compute the arc tangent of @var{z}/@var{y},
using the sign of @var{z} and @var{y} to determine the quadrant.
@end deffn

asinh
@c snarfed from numbers.c:6018
@deffn {Scheme Procedure} asinh z
Compute the inverse hyperbolic sine of @var{z}.
@end deffn

acosh
@c snarfed from numbers.c:6036
@deffn {Scheme Procedure} acosh z
Compute the inverse hyperbolic cosine of @var{z}.
@end deffn

atanh
@c snarfed from numbers.c:6054
@deffn {Scheme Procedure} atanh z
Compute the inverse hyperbolic tangent of @var{z}.
@end deffn

make-rectangular
@c snarfed from numbers.c:6085
@deffn {Scheme Procedure} make-rectangular real_part imaginary_part
Return a complex number constructed of the given @var{real_part} and @var{imaginary_part} parts.
@end deffn

make-polar
@c snarfed from numbers.c:6141
@deffn {Scheme Procedure} make-polar mag ang
Return the complex number @var{mag} * e^(i * @var{ang}).
@end deffn

real-part
@c snarfed from numbers.c:6161
@deffn {Scheme Procedure} real-part z
Return the real part of the number @var{z}.
@end deffn

imag-part
@c snarfed from numbers.c:6176
@deffn {Scheme Procedure} imag-part z
Return the imaginary part of the number @var{z}.
@end deffn

numerator
@c snarfed from numbers.c:6190
@deffn {Scheme Procedure} numerator z
Return the numerator of the number @var{z}.
@end deffn

denominator
@c snarfed from numbers.c:6215
@deffn {Scheme Procedure} denominator z
Return the denominator of the number @var{z}.
@end deffn

magnitude
@c snarfed from numbers.c:6241
@deffn {Scheme Procedure} magnitude z
Return the magnitude of the number @var{z}. This is the same as
@code{abs} for real arguments, but also allows complex numbers.
@end deffn

angle
@c snarfed from numbers.c:6258
@deffn {Scheme Procedure} angle z
Return the angle of the complex number @var{z}.
@end deffn

exact->inexact
@c snarfed from numbers.c:6282
@deffn {Scheme Procedure} exact->inexact z
Convert the number @var{z} to its inexact representation.

@end deffn

inexact->exact
@c snarfed from numbers.c:6302
@deffn {Scheme Procedure} inexact->exact z
Return an exact number that is numerically closest to @var{z}.
@end deffn

rationalize
@c snarfed from numbers.c:6351
@deffn {Scheme Procedure} rationalize x eps
Returns the @emph{simplest} rational number differing
from @var{x} by no more than @var{eps}.

As required by @acronym{R5RS}, @code{rationalize} only returns an
exact result when both its arguments are exact.  Thus, you might need
to use @code{inexact->exact} on the arguments.

@lisp
(rationalize (inexact->exact 1.2) 1/100)
@result{} 6/5
@end lisp
@end deffn

log
@c snarfed from numbers.c:7032
@deffn {Scheme Procedure} log z
Return the natural logarithm of @var{z}.
@end deffn

log10
@c snarfed from numbers.c:7068
@deffn {Scheme Procedure} log10 z
Return the base 10 logarithm of @var{z}.
@end deffn

exp
@c snarfed from numbers.c:7114
@deffn {Scheme Procedure} exp z
Return @math{e} to the power of @var{z}, where @math{e} is the
base of natural logarithms (2.71828@dots{}).
@end deffn

exact-integer-sqrt
@c snarfed from numbers.c:7142
@deffn {Scheme Procedure} exact-integer-sqrt k
Return two exact non-negative integers @var{s} and @var{r}
such that @math{@var{k} = @var{s}^2 + @var{r}} and
@math{@var{s}^2 <= @var{k} < (@var{s} + 1)^2}.
An error is raised if @var{k} is not an exact non-negative integer.

@lisp
(exact-integer-sqrt 10) @result{} 3 and 1
@end lisp
@end deffn

sqrt
@c snarfed from numbers.c:7180
@deffn {Scheme Procedure} sqrt z
Return the square root of @var{z}.  Of the two possible roots
(positive and negative), the one with positive real part
is returned, or if that's zero then a positive imaginary part.
Thus,

@example
(sqrt 9.0)       @result{} 3.0
(sqrt -9.0)      @result{} 0.0+3.0i
(sqrt 1.0+1.0i)  @result{} 1.09868411346781+0.455089860562227i
(sqrt -1.0-1.0i) @result{} 0.455089860562227-1.09868411346781i
@end example
@end deffn

object-properties
@c snarfed from objprop.c:44
@deffn {Scheme Procedure} object-properties obj
Return @var{obj}'s property list.
@end deffn

set-object-properties!
@c snarfed from objprop.c:54
@deffn {Scheme Procedure} set-object-properties! obj alist
Set @var{obj}'s property list to @var{alist}.
@end deffn

object-property
@c snarfed from objprop.c:65
@deffn {Scheme Procedure} object-property obj key
Return the property of @var{obj} with name @var{key}.
@end deffn

set-object-property!
@c snarfed from objprop.c:76
@deffn {Scheme Procedure} set-object-property! obj key value
In @var{obj}'s property list, set the property named @var{key}
to @var{value}.
@end deffn

pair?
@c snarfed from pairs.c:78
@deffn {Scheme Procedure} pair? x
Return @code{#t} if @var{x} is a pair; otherwise return
@code{#f}.
@end deffn

set-car!
@c snarfed from pairs.c:88
@deffn {Scheme Procedure} set-car! pair value
Stores @var{value} in the car field of @var{pair}.  The value returned
by @code{set-car!} is unspecified.
@end deffn

set-cdr!
@c snarfed from pairs.c:101
@deffn {Scheme Procedure} set-cdr! pair value
Stores @var{value} in the cdr field of @var{pair}.  The value returned
by @code{set-cdr!} is unspecified.
@end deffn

cddr
@c snarfed from pairs.c:135
@deffn {Scheme Procedure} cddr x

@end deffn

cdar
@c snarfed from pairs.c:142
@deffn {Scheme Procedure} cdar x

@end deffn

cadr
@c snarfed from pairs.c:149
@deffn {Scheme Procedure} cadr x

@end deffn

caar
@c snarfed from pairs.c:156
@deffn {Scheme Procedure} caar x

@end deffn

cdddr
@c snarfed from pairs.c:163
@deffn {Scheme Procedure} cdddr x

@end deffn

cddar
@c snarfed from pairs.c:170
@deffn {Scheme Procedure} cddar x

@end deffn

cdadr
@c snarfed from pairs.c:177
@deffn {Scheme Procedure} cdadr x

@end deffn

cdaar
@c snarfed from pairs.c:184
@deffn {Scheme Procedure} cdaar x

@end deffn

caddr
@c snarfed from pairs.c:191
@deffn {Scheme Procedure} caddr x

@end deffn

cadar
@c snarfed from pairs.c:198
@deffn {Scheme Procedure} cadar x

@end deffn

caadr
@c snarfed from pairs.c:205
@deffn {Scheme Procedure} caadr x

@end deffn

caaar
@c snarfed from pairs.c:212
@deffn {Scheme Procedure} caaar x

@end deffn

cddddr
@c snarfed from pairs.c:219
@deffn {Scheme Procedure} cddddr x

@end deffn

cdddar
@c snarfed from pairs.c:226
@deffn {Scheme Procedure} cdddar x

@end deffn

cddadr
@c snarfed from pairs.c:233
@deffn {Scheme Procedure} cddadr x

@end deffn

cddaar
@c snarfed from pairs.c:240
@deffn {Scheme Procedure} cddaar x

@end deffn

cdaddr
@c snarfed from pairs.c:247
@deffn {Scheme Procedure} cdaddr x

@end deffn

cdadar
@c snarfed from pairs.c:254
@deffn {Scheme Procedure} cdadar x

@end deffn

cdaadr
@c snarfed from pairs.c:261
@deffn {Scheme Procedure} cdaadr x

@end deffn

cdaaar
@c snarfed from pairs.c:268
@deffn {Scheme Procedure} cdaaar x

@end deffn

cadddr
@c snarfed from pairs.c:275
@deffn {Scheme Procedure} cadddr x

@end deffn

caddar
@c snarfed from pairs.c:282
@deffn {Scheme Procedure} caddar x

@end deffn

cadadr
@c snarfed from pairs.c:289
@deffn {Scheme Procedure} cadadr x

@end deffn

cadaar
@c snarfed from pairs.c:296
@deffn {Scheme Procedure} cadaar x

@end deffn

caaddr
@c snarfed from pairs.c:303
@deffn {Scheme Procedure} caaddr x

@end deffn

caadar
@c snarfed from pairs.c:310
@deffn {Scheme Procedure} caadar x

@end deffn

caaadr
@c snarfed from pairs.c:317
@deffn {Scheme Procedure} caaadr x

@end deffn

caaaar
@c snarfed from pairs.c:324
@deffn {Scheme Procedure} caaaar x

@end deffn

%port-property
@c snarfed from ports.c:400
@deffn {Scheme Procedure} %port-property port key
Return the property of @var{port} associated with @var{key}.
@end deffn

%set-port-property!
@c snarfed from ports.c:411
@deffn {Scheme Procedure} %set-port-property! port key value
Set the property of @var{port} associated with @var{key} to @var{value}.
@end deffn

current-input-port
@c snarfed from ports.c:437
@deffn {Scheme Procedure} current-input-port
Return the current input port.  This is the default port used
by many input procedures.  Initially, @code{current-input-port}
returns the @dfn{standard input} in Unix and C terminology.
@end deffn

current-output-port
@c snarfed from ports.c:451
@deffn {Scheme Procedure} current-output-port
Return the current output port.  This is the default port used
by many output procedures.  Initially,
@code{current-output-port} returns the @dfn{standard output} in
Unix and C terminology.
@end deffn

current-error-port
@c snarfed from ports.c:466
@deffn {Scheme Procedure} current-error-port
Return the port to which errors and warnings should be sent (the
@dfn{standard error} in Unix and C terminology).
@end deffn

current-warning-port
@c snarfed from ports.c:479
@deffn {Scheme Procedure} current-warning-port
Return the port to which diagnostic warnings should be sent.
@end deffn

current-load-port
@c snarfed from ports.c:491
@deffn {Scheme Procedure} current-load-port
Return the current-load-port.
The load port is used internally by @code{primitive-load}.
@end deffn

port-mode
@c snarfed from ports.c:649
@deffn {Scheme Procedure} port-mode port
Return the port modes associated with the open port @var{port}.
These will not necessarily be identical to the modes used when
the port was opened, since modes such as "append" which are
used only during port creation are not retained.
@end deffn

port?
@c snarfed from ports.c:811
@deffn {Scheme Procedure} port? x
Return a boolean indicating whether @var{x} is a port.
Equivalent to @code{(or (input-port? @var{x}) (output-port?
@var{x}))}.
@end deffn

input-port?
@c snarfed from ports.c:822
@deffn {Scheme Procedure} input-port? x
Return @code{#t} if @var{x} is an input port, otherwise return
@code{#f}.  Any object satisfying this predicate also satisfies
@code{port?}.
@end deffn

output-port?
@c snarfed from ports.c:833
@deffn {Scheme Procedure} output-port? x
Return @code{#t} if @var{x} is an output port, otherwise return
@code{#f}.  Any object satisfying this predicate also satisfies
@code{port?}.
@end deffn

port-closed?
@c snarfed from ports.c:845
@deffn {Scheme Procedure} port-closed? port
Return @code{#t} if @var{port} is closed or @code{#f} if it is
open.
@end deffn

eof-object?
@c snarfed from ports.c:856
@deffn {Scheme Procedure} eof-object? x
Return @code{#t} if @var{x} is an end-of-file object; otherwise
return @code{#f}.
@end deffn

close-port
@c snarfed from ports.c:898
@deffn {Scheme Procedure} close-port port
Close the specified port object.  Return @code{#t} if it
successfully closes a port or @code{#f} if it was already
closed.  An exception may be raised if an error occurs, for
example when flushing buffered output.  See also @ref{Ports and
File Descriptors, close}, for a procedure which can close file
descriptors.
@end deffn

close-input-port
@c snarfed from ports.c:915
@deffn {Scheme Procedure} close-input-port port
Close the specified input port object.  The routine has no effect if
the file has already been closed.  An exception may be raised if an
error occurs.  The value returned is unspecified.

See also @ref{Ports and File Descriptors, close}, for a procedure
which can close file descriptors.
@end deffn

close-output-port
@c snarfed from ports.c:930
@deffn {Scheme Procedure} close-output-port port
Close the specified output port object.  The routine has no effect if
the file has already been closed.  An exception may be raised if an
error occurs.  The value returned is unspecified.

See also @ref{Ports and File Descriptors, close}, for a procedure
which can close file descriptors.
@end deffn

specialize-port-encoding!
@c snarfed from ports.c:1151
@deffn {Scheme Procedure} specialize-port-encoding! port encoding

@end deffn

%port-encoding
@c snarfed from ports.c:1230
@deffn {Scheme Procedure} %port-encoding port
Returns, as a symbol, the character encoding that @var{port}
uses to interpret its input and output.

@end deffn

%set-port-encoding!
@c snarfed from ports.c:1248
@deffn {Scheme Procedure} %set-port-encoding! port enc
Sets the character encoding that will be used to interpret all
port I/O.  New ports are created with the encoding
appropriate for the current locale if @code{setlocale} has 
been called or ISO-8859-1 otherwise
and this procedure can be used to modify that encoding.

@end deffn

port-conversion-strategy
@c snarfed from ports.c:1284
@deffn {Scheme Procedure} port-conversion-strategy port
Returns the behavior of the port when handling a character that
is not representable in the port's current encoding.
It returns the symbol @code{error} if unrepresentable characters
should cause exceptions, @code{substitute} if the port should
try to replace unrepresentable characters with question marks or
approximate characters, or @code{escape} if unrepresentable
characters should be converted to string escapes.

If @var{port} is @code{#f}, then the current default behavior
will be returned.  New ports will have this default behavior
when they are created.

@end deffn

set-port-conversion-strategy!
@c snarfed from ports.c:1307
@deffn {Scheme Procedure} set-port-conversion-strategy! port sym
Sets the behavior of the interpreter when outputting a character
that is not representable in the port's current encoding.
@var{sym} can be either @code{'error}, @code{'substitute}, or
@code{'escape}.  If it is @code{'error}, an error will be thrown
when an unconvertible character is encountered.  If it is
@code{'substitute}, then unconvertible characters will 
be replaced with approximate characters, or with question marks
if no approximately correct character is available.
If it is @code{'escape},
it will appear as a hex escape when output.

If @var{port} is an open port, the conversion error behavior
is set for that port.  If it is @code{#f}, it is set as the
default behavior for any future ports that get created in
this thread.

@end deffn

port-read-wait-fd
@c snarfed from ports.c:1364
@deffn {Scheme Procedure} port-read-wait-fd port

@end deffn

port-write-wait-fd
@c snarfed from ports.c:1379
@deffn {Scheme Procedure} port-write-wait-fd port

@end deffn

port-poll
@c snarfed from ports.c:1431
@deffn {Scheme Procedure} port-poll port events [timeout]

@end deffn

port-decode-char
@c snarfed from ports.c:1873
@deffn {Scheme Procedure} port-decode-char port bv start count

@end deffn

read-char
@c snarfed from ports.c:2011
@deffn {Scheme Procedure} read-char [port]
Return the next character available from @var{port}, updating
@var{port} to point to the following character.  If no more
characters are available, the end-of-file object is returned.

When @var{port}'s data cannot be decoded according to its
character encoding, a @code{decoding-error} is raised and
@var{port} points past the erroneous byte sequence.

@end deffn

peek-char
@c snarfed from ports.c:2171
@deffn {Scheme Procedure} peek-char [port]
Return the next character available from @var{port},
@emph{without} updating @var{port} to point to the following
character.  If no more characters are available, the
end-of-file object is returned.

The value returned by
a call to @code{peek-char} is the same as the value that would
have been returned by a call to @code{read-char} on the same
port.  The only difference is that the very next call to
@code{read-char} or @code{peek-char} on that @var{port} will
return the value returned by the preceding call to
@code{peek-char}.  In particular, a call to @code{peek-char} on
an interactive port will hang waiting for input whenever a call
to @code{read-char} would have hung.

As for @code{read-char}, a @code{decoding-error} may be raised
if such a situation occurs.  However, unlike with @code{read-char},
@var{port} still points at the beginning of the erroneous byte
sequence when the error is raised.

@end deffn

unread-char
@c snarfed from ports.c:2208
@deffn {Scheme Procedure} unread-char cobj [port]
Place character @var{cobj} in @var{port} so that it will be
read by the next read operation.  If called multiple times, the
unread characters will be read again in last-in first-out
order.  If @var{port} is not supplied, the current input port
is used.
@end deffn

unread-string
@c snarfed from ports.c:2231
@deffn {Scheme Procedure} unread-string str [port]
Place the string @var{str} in @var{port} so that its characters will be
read in subsequent read operations.  If called multiple times, the
unread characters will be read again in last-in first-out order.  If
@var{port} is not supplied, the current-input-port is used.
@end deffn

setvbuf
@c snarfed from ports.c:2264
@deffn {Scheme Procedure} setvbuf port mode [size]
Set the buffering mode for @var{port}.  @var{mode} can be one
of the following symbols:
@table @code
@item none
no buffering
@item line
line buffering
@item block
block buffering, using a newly allocated buffer of @var{size} bytes.
If @var{size} is omitted, a default size will be used.
@end table

Only certain types of ports are supported, most importantly
file ports.
@end deffn

drain-input
@c snarfed from ports.c:2369
@deffn {Scheme Procedure} drain-input port
This procedure clears a port's input buffers, similar
to the way that force-output clears the output buffer.  The
contents of the buffers are returned as a single string, e.g.,

@lisp
(define p (open-input-file ...))
(drain-input p) => empty string, nothing buffered yet.
(unread-char (read-char p) p)
(drain-input p) => initial chars from p, up to the buffer size.
@end lisp

Draining the buffers may be useful for cleanly finishing
buffered I/O so that the file descriptor can be used directly
for further input.
@end deffn

force-output
@c snarfed from ports.c:2427
@deffn {Scheme Procedure} force-output [port]
Flush the specified output port, or the current output port if @var{port}
is omitted.  The current output buffer contents are passed to the
underlying port implementation (e.g., in the case of fports, the
data will be written to the file and the output buffer will be cleared.)
It has no effect on an unbuffered port.

The return value is unspecified.
@end deffn

port-clear-stream-start-for-bom-read
@c snarfed from ports.c:2545
@deffn {Scheme Procedure} port-clear-stream-start-for-bom-read port

@end deffn

port-clear-stream-start-for-bom-write
@c snarfed from ports.c:2569
@deffn {Scheme Procedure} port-clear-stream-start-for-bom-write port [buf]

@end deffn

port-random-access?
@c snarfed from ports.c:2706
@deffn {Scheme Procedure} port-random-access? port
Return true if the port is random-access, or false otherwise.
@end deffn

port-read-buffering
@c snarfed from ports.c:2716
@deffn {Scheme Procedure} port-read-buffering port
Return the amount of read buffering on a port, in bytes.
@end deffn

expand-port-read-buffer!
@c snarfed from ports.c:2726
@deffn {Scheme Procedure} expand-port-read-buffer! port size [putback_p]
Expand the read buffer of @var{port} to @var{size}.  Copy the
old buffered data, if, any, to the beginning of the new
buffer, unless @var{putback_p} is true, in which case copy it
to the end instead.  Return the new buffer.
@end deffn

port-read
@c snarfed from ports.c:2770
@deffn {Scheme Procedure} port-read port
Return the read function for an input port.
@end deffn

port-write
@c snarfed from ports.c:2779
@deffn {Scheme Procedure} port-write port
Return the write function for an output port.
@end deffn

port-read-buffer
@c snarfed from ports.c:2789
@deffn {Scheme Procedure} port-read-buffer port
Return the read buffer for a port.
@end deffn

port-write-buffer
@c snarfed from ports.c:2799
@deffn {Scheme Procedure} port-write-buffer port
Return the write buffer for a port.
@end deffn

port-auxiliary-write-buffer
@c snarfed from ports.c:2809
@deffn {Scheme Procedure} port-auxiliary-write-buffer port
Return the auxiliary write buffer for a port.
@end deffn

port-line-buffered?
@c snarfed from ports.c:2827
@deffn {Scheme Procedure} port-line-buffered? port
Return true if the port is line buffered.
@end deffn

port-encode-chars
@c snarfed from ports.c:3403
@deffn {Scheme Procedure} port-encode-chars port buf str start count

@end deffn

port-encode-char
@c snarfed from ports.c:3426
@deffn {Scheme Procedure} port-encode-char port buf ch

@end deffn

put-char
@c snarfed from ports.c:3567
@deffn {Scheme Procedure} put-char port ch
Encode @var{ch} to bytes, and send those bytes to @var{port}.
@end deffn

put-string
@c snarfed from ports.c:3580
@deffn {Scheme Procedure} put-string port string [start [count]]
Display the @var{count} characters from @var{string} to
@var{port}, starting with the character at index @var{start}.
@var{start} defaults to 0, and @var{count} defaults to
displaying all characters until the end of the string.

Calling @code{put-string} is equivalent in all respects to
calling @code{put-char} on the relevant sequence of characters,
except that it will attempt to write multiple characters to
the port at a time, even if the port is unbuffered.
@end deffn

char-ready?
@c snarfed from ports.c:3647
@deffn {Scheme Procedure} char-ready? [port]
Return @code{#t} if a character is ready on input @var{port}
and return @code{#f} otherwise.  If @code{char-ready?} returns
@code{#t} then the next @code{read-char} operation on
@var{port} is guaranteed not to hang.  If @var{port} is a file
port at end of file then @code{char-ready?} returns @code{#t}.

@code{char-ready?} exists to make it possible for a
program to accept characters from interactive ports without
getting stuck waiting for input.  Any input editors associated
with such ports must make sure that characters whose existence
has been asserted by @code{char-ready?} cannot be rubbed out.
If @code{char-ready?} were to return @code{#f} at end of file,
a port at end of file would be indistinguishable from an
interactive port that has no ready characters.
@end deffn

seek
@c snarfed from ports.c:3699
@deffn {Scheme Procedure} seek fd_port offset whence
Sets the current position of @var{fd_port} to the integer
@var{offset}, which is interpreted according to the value of
@var{whence}.

One of the following variables should be supplied for
@var{whence}:
@defvar SEEK_SET
Seek from the beginning of the file.
@end defvar
@defvar SEEK_CUR
Seek from the current position.
@end defvar
@defvar SEEK_END
Seek from the end of the file.
@end defvar
On systems that support it, such as GNU/Linux, the following
constants can be used for @var{whence} to navigate ``holes'' in
sparse files:
@defvar SEEK_DATA
Seek to the next location in the file greater than or equal to
@var{offset} containing data.  If @var{offset} points to data,
then the file offset is set to @var{offset}.
@end defvar
@defvar SEEK_HOLE
Seek to the next hole in the file greater than or equal to the
@var{offset}.  If @var{offset} points into the middle of a hole,
then the file offset is set to @var{offset}.  If there is no hole
past @var{offset}, then the file offset is adjusted to the end of
the file---i.e., there is an implicit hole at the end of any file.
@end defvar

If @var{fd_port} is a file descriptor, the underlying system call
is @code{lseek} (@pxref{File Position Primitive,,, libc, The GNU C
Library Reference Manual}).  @var{port} may be a string port.

The value returned is the new position in the file.  This means
that the current position of a port can be obtained using:
@lisp
(seek port 0 SEEK_CUR)
@end lisp
@end deffn

truncate-file
@c snarfed from ports.c:3841
@deffn {Scheme Procedure} truncate-file object [length]
Truncate file @var{object} to @var{length} bytes.  @var{object}
can be a filename string, a port object, or an integer file
descriptor.
The return value is unspecified.

For a port or file descriptor @var{length} can be omitted, in
which case the file is truncated at the current position (per
@code{ftell} above).

On most systems a file can be extended by giving a length
greater than the current size, but this is not mandatory in the
POSIX standard.
@end deffn

port-line
@c snarfed from ports.c:3918
@deffn {Scheme Procedure} port-line port
Return the current line number for @var{port}.

The first line of a file is 0.  But you might want to add 1
when printing line numbers, since starting from 1 is
traditional in error messages, and likely to be more natural to
non-programmers.
@end deffn

set-port-line!
@c snarfed from ports.c:3934
@deffn {Scheme Procedure} set-port-line! port line
Set the current line number for @var{port} to @var{line}.  The
first line of a file is 0.
@end deffn

port-column
@c snarfed from ports.c:3948
@deffn {Scheme Procedure} port-column port
Return the current column number of @var{port}.
If the number is
unknown, the result is #f.  Otherwise, the result is a 0-origin integer
- i.e. the first character of the first line is line 0, column 0.
(However, when you display a file position, for example in an error
message, we recommend you add 1 to get 1-origin integers.  This is
because lines and column numbers traditionally start with 1, and that is
what non-programmers will find most natural.)
@end deffn

set-port-column!
@c snarfed from ports.c:3966
@deffn {Scheme Procedure} set-port-column! port column
Set the current column of @var{port}.  Before reading the first
character on a line the column should be 0.
@end deffn

port-filename
@c snarfed from ports.c:3980
@deffn {Scheme Procedure} port-filename port
Return the filename associated with @var{port}, or @code{#f}
if no filename is associated with the port.
@end deffn

set-port-filename!
@c snarfed from ports.c:3992
@deffn {Scheme Procedure} set-port-filename! port filename
Change the filename associated with @var{port}, using the current input
port if none is specified.  Note that this does not change the port's
source of data, but only the value that is returned by
@code{port-filename} and reported in diagnostic output.
@end deffn

port-for-each
@c snarfed from ports.c:4082
@deffn {Scheme Procedure} port-for-each proc
Apply @var{proc} to each port in the Guile port table
in turn.  The return value is unspecified.  More specifically,
@var{proc} is applied exactly once to every port that exists
in the system at the time @code{port-for-each} is invoked.
Changes to the port table while @code{port-for-each} is running
have no effect as far as @code{port-for-each} is concerned.
@end deffn

flush-all-ports
@c snarfed from ports.c:4107
@deffn {Scheme Procedure} flush-all-ports
Equivalent to calling @code{force-output} on
all open output ports.  The return value is unspecified.
@end deffn

%make-void-port
@c snarfed from ports.c:4149
@deffn {Scheme Procedure} %make-void-port mode
Create and return a new void port.  A void port acts like
@file{/dev/null}.  The @var{mode} argument
specifies the input/output modes for this port: see the
documentation for @code{open-file} in @ref{File Ports}.
@end deffn

print-options-interface
@c snarfed from print.c:127
@deffn {Scheme Procedure} print-options-interface [setting]
Option interface for the print options. Instead of using
this procedure directly, use the procedures
@code{print-enable}, @code{print-disable}, @code{print-set!}
and @code{print-options}.
@end deffn

simple-format
@c snarfed from print.c:1120
@deffn {Scheme Procedure} simple-format destination message . args
Write @var{message} to @var{destination}, defaulting to
the current output port.
@var{message} can contain @code{~A} (was @code{%s}) and
@code{~S} (was @code{%S}) escapes.  When printed,
the escapes are replaced with corresponding members of
@var{args}:
@code{~A} formats using @code{display} and @code{~S} formats
using @code{write}.
If @var{destination} is @code{#t}, then use the current output
port, if @var{destination} is @code{#f}, then return a string
containing the formatted text. Does not add a trailing newline.
@end deffn

newline
@c snarfed from print.c:1216
@deffn {Scheme Procedure} newline [port]
Send a newline to @var{port}.
If @var{port} is omitted, send to the current output port.
@end deffn

write-char
@c snarfed from print.c:1232
@deffn {Scheme Procedure} write-char chr [port]
Send character @var{chr} to @var{port}.
@end deffn

port-with-print-state
@c snarfed from print.c:1280
@deffn {Scheme Procedure} port-with-print-state port [pstate]
Create a new port which behaves like @var{port}, but with an
included print state @var{pstate}.  @var{pstate} is optional.
If @var{pstate} isn't supplied and @var{port} already has
a print state, the old print state is reused.
@end deffn

get-print-state
@c snarfed from print.c:1295
@deffn {Scheme Procedure} get-print-state port
Return the print state of the port @var{port}. If @var{port}
has no associated print state, @code{#f} is returned.
@end deffn

set-procedure-minimum-arity!
@c snarfed from procprop.c:99
@deffn {Scheme Procedure} set-procedure-minimum-arity! proc req opt rest

@end deffn

procedure-minimum-arity
@c snarfed from procprop.c:116
@deffn {Scheme Procedure} procedure-minimum-arity proc
Return the "minimum arity" of a procedure.

If the procedure has only one arity, that arity is returned
as a list of three values: the number of required arguments,
the number of optional arguments, and a boolean indicating
whether or not the procedure takes rest arguments.

For a case-lambda procedure, the arity returned is the one
with the lowest minimum number of arguments, and the highest
maximum number of arguments.

If it was not possible to determine the arity of the procedure,
@code{#f} is returned.
@end deffn

procedure-properties
@c snarfed from procprop.c:141
@deffn {Scheme Procedure} procedure-properties proc
Return @var{proc}'s property list.
@end deffn

set-procedure-properties!
@c snarfed from procprop.c:170
@deffn {Scheme Procedure} set-procedure-properties! proc alist
Set @var{proc}'s property list to @var{alist}.
@end deffn

procedure-property
@c snarfed from procprop.c:183
@deffn {Scheme Procedure} procedure-property proc key
Return the property of @var{proc} with name @var{key}.
@end deffn

set-procedure-property!
@c snarfed from procprop.c:211
@deffn {Scheme Procedure} set-procedure-property! proc key val
In @var{proc}'s property list, set the property named @var{key} to
@var{val}.
@end deffn

procedure-name
@c snarfed from procprop.c:248
@deffn {Scheme Procedure} procedure-name proc
Return the name of the procedure @var{proc}
@end deffn

procedure-documentation
@c snarfed from procprop.c:279
@deffn {Scheme Procedure} procedure-documentation proc
Return the documentation string associated with @code{proc}.  By
convention, if a procedure contains more than one expression and the
first expression is a string constant, that string is assumed to contain
documentation for that procedure.
@end deffn

procedure-source
@c snarfed from procprop.c:312
@deffn {Scheme Procedure} procedure-source proc
Return the source of the procedure @var{proc}.
@end deffn

procedure?
@c snarfed from procs.c:47
@deffn {Scheme Procedure} procedure? obj
Return @code{#t} if @var{obj} is a procedure.
@end deffn

thunk?
@c snarfed from procs.c:59
@deffn {Scheme Procedure} thunk? obj
Return @code{#t} if @var{obj} is a procedure that can be called with zero arguments.
@end deffn

procedure-with-setter?
@c snarfed from procs.c:78
@deffn {Scheme Procedure} procedure-with-setter? obj
Return @code{#t} if @var{obj} is a procedure with an
associated setter procedure.
@end deffn

make-procedure-with-setter
@c snarfed from procs.c:88
@deffn {Scheme Procedure} make-procedure-with-setter procedure setter
Create a new procedure which behaves like @var{procedure}, but
with the associated setter @var{setter}.
@end deffn

procedure
@c snarfed from procs.c:100
@deffn {Scheme Procedure} procedure proc
Return the procedure of @var{proc}, which must be an
applicable struct.
@end deffn

setter
@c snarfed from procs.c:112
@deffn {Scheme Procedure} setter proc
Return the setter of @var{proc}, which must be an
applicable struct with a setter.
@end deffn

make-promise
@c snarfed from promises.c:66
@deffn {Scheme Procedure} make-promise thunk
Create a new promise object.

@code{make-promise} is a procedural form of @code{delay}.
These two expressions are equivalent:
@lisp
(delay @var{exp})
(make-promise (lambda () @var{exp}))
@end lisp

@end deffn

force
@c snarfed from promises.c:96
@deffn {Scheme Procedure} force promise
If @var{promise} has not been computed yet, compute and
return @var{promise}, otherwise just return the previously computed
value.
@end deffn

promise?
@c snarfed from promises.c:120
@deffn {Scheme Procedure} promise? obj
Return true if @var{obj} is a promise, i.e. a delayed computation
(@pxref{Delayed evaluation,,,r5rs.info,The Revised^5 Report on Scheme}).
@end deffn

eof-object
@c snarfed from r6rs-ports.c:78
@deffn {Scheme Procedure} eof-object
Return the end-of-file object.
@end deffn

open-bytevector-input-port
@c snarfed from r6rs-ports.c:184
@deffn {Scheme Procedure} open-bytevector-input-port bv [transcoder]
Return an input port whose contents are drawn from bytevector @var{bv}.
@end deffn

get-u8
@c snarfed from r6rs-ports.c:207
@deffn {Scheme Procedure} get-u8 port
Read an octet from @var{port}, a binary input port, blocking as necessary.
@end deffn

lookahead-u8
@c snarfed from r6rs-ports.c:228
@deffn {Scheme Procedure} lookahead-u8 port
Like @code{get-u8} but does not update @var{port} to point past the octet.
@end deffn

get-bytevector-n
@c snarfed from r6rs-ports.c:249
@deffn {Scheme Procedure} get-bytevector-n port count
Read @var{count} octets from @var{port}, blocking as necessary and return a bytevector containing the octets read.  If fewer bytes are available, a bytevector smaller than @var{count} is returned.
@end deffn

get-bytevector-n!
@c snarfed from r6rs-ports.c:285
@deffn {Scheme Procedure} get-bytevector-n! port bv start count
Read @var{count} bytes from @var{port} and store them in @var{bv} starting at index @var{start}.  Return either the number of bytes actually read or the end-of-file object.
@end deffn

get-bytevector-some
@c snarfed from r6rs-ports.c:323
@deffn {Scheme Procedure} get-bytevector-some port
Read from @var{port}, blocking as necessary, until bytes are available or an end-of-file is reached.  Return either the end-of-file object or a new bytevector containing some of the available bytes (at least one), and update the port position to point just past these bytes.
@end deffn

get-bytevector-some!
@c snarfed from r6rs-ports.c:353
@deffn {Scheme Procedure} get-bytevector-some! port bv start count
Read up to @var{count} bytes from @var{port}, blocking as necessary until at least one byte is available or an end-of-file is reached.  Store them in @var{bv} starting at index @var{start}.  Return the number of bytes actually read, or an end-of-file object.
@end deffn

put-u8
@c snarfed from r6rs-ports.c:423
@deffn {Scheme Procedure} put-u8 port octet
Write @var{octet} to binary port @var{port}.
@end deffn

put-bytevector
@c snarfed from r6rs-ports.c:439
@deffn {Scheme Procedure} put-bytevector port bv [start [count]]
Write the contents of @var{bv} to @var{port}, optionally starting at index @var{start} and limiting to @var{count} octets.
@end deffn

unget-bytevector
@c snarfed from r6rs-ports.c:477
@deffn {Scheme Procedure} unget-bytevector port bv [start [count]]
Unget the contents of @var{bv} to @var{port}, optionally starting at index @var{start} and limiting to @var{count} octets.
@end deffn

open-bytevector-output-port
@c snarfed from r6rs-ports.c:711
@deffn {Scheme Procedure} open-bytevector-output-port [transcoder]
Return two values: an output port and a procedure.  The latter should be called with zero arguments to obtain a bytevector containing the data accumulated by the port.
@end deffn

%make-transcoded-port
@c snarfed from r6rs-ports.c:842
@deffn {Scheme Procedure} %make-transcoded-port port
Return a new port which reads and writes to @var{port}
@end deffn

get-string-n!
@c snarfed from r6rs-ports.c:872
@deffn {Scheme Procedure} get-string-n! port str start count
Read up to @var{count} characters from @var{port} into @var{str}, starting at @var{start}.  If no characters can be read before the end of file is encountered, the end of file object is returned.  Otherwise, the number of characters read is returned.
@end deffn

random
@c snarfed from random.c:399
@deffn {Scheme Procedure} random n [state]
Return a number in [0, N).

Accepts a positive integer or real n and returns a
number of the same type between zero (inclusive) and
N (exclusive). The values returned have a uniform
distribution.

The optional argument @var{state} must be of the type produced
by @code{seed->random-state}. It defaults to the value of the
variable @var{*random-state*}. This object is used to maintain
the state of the pseudo-random-number generator and is altered
as a side effect of the random operation.
@end deffn

copy-random-state
@c snarfed from random.c:442
@deffn {Scheme Procedure} copy-random-state [state]
Return a copy of the random state @var{state}.
@end deffn

seed->random-state
@c snarfed from random.c:454
@deffn {Scheme Procedure} seed->random-state seed
Return a new random state using @var{seed}.
@end deffn

datum->random-state
@c snarfed from random.c:493
@deffn {Scheme Procedure} datum->random-state datum
Return a new random state using @var{datum}, which should have
been obtained from @code{random-state->datum}.
@end deffn

random-state->datum
@c snarfed from random.c:503
@deffn {Scheme Procedure} random-state->datum state
Return a datum representation of @var{state} that may be
written out and read back with the Scheme reader.
@end deffn

random:uniform
@c snarfed from random.c:514
@deffn {Scheme Procedure} random:uniform [state]
Return a uniformly distributed inexact real random number in
[0,1).
@end deffn

random:normal
@c snarfed from random.c:527
@deffn {Scheme Procedure} random:normal [state]
Return an inexact real in a normal distribution.  The
distribution used has mean 0 and standard deviation 1.  For a
normal distribution with mean m and standard deviation d use
@code{(+ m (* d (random:normal)))}.
@end deffn

random:solid-sphere!
@c snarfed from random.c:619
@deffn {Scheme Procedure} random:solid-sphere! v [state]
Fills @var{vect} with inexact real random numbers the sum of
whose squares is less than 1.0.  Thinking of @var{vect} as
coordinates in space of dimension @var{n} @math{=}
@code{(vector-length @var{vect})}, the coordinates are
uniformly distributed within the unit @var{n}-sphere.
@end deffn

random:hollow-sphere!
@c snarfed from random.c:640
@deffn {Scheme Procedure} random:hollow-sphere! v [state]
Fills vect with inexact real random numbers
the sum of whose squares is equal to 1.0.
Thinking of vect as coordinates in space of
dimension n = (vector-length vect), the coordinates
are uniformly distributed over the surface of the
unit n-sphere.
@end deffn

random:normal-vector!
@c snarfed from random.c:660
@deffn {Scheme Procedure} random:normal-vector! v [state]
Fills vect with inexact real random numbers that are
independent and standard normally distributed
(i.e., with mean 0 and variance 1).
@end deffn

random:exp
@c snarfed from random.c:703
@deffn {Scheme Procedure} random:exp [state]
Return an inexact real in an exponential distribution with mean
1.  For an exponential distribution with mean u use (* u
(random:exp)).
@end deffn

random-state-from-platform
@c snarfed from random.c:805
@deffn {Scheme Procedure} random-state-from-platform
Construct a new random state seeded from a platform-specific
source of entropy, appropriate for use in non-security-critical applications.
@end deffn

%read-delimited!
@c snarfed from rdelim.c:41
@deffn {Scheme Procedure} %read-delimited! delims str gobble [port [start [end]]]
Read characters from @var{port} into @var{str} until one of the
characters in the @var{delims} string is encountered.  If
@var{gobble} is true, discard the delimiter character;
otherwise, leave it in the input stream for the next read.  If
@var{port} is not specified, use the value of
@code{(current-input-port)}.  If @var{start} or @var{end} are
specified, store data only into the substring of @var{str}
bounded by @var{start} and @var{end} (which default to the
beginning and end of the string, respectively).

 Return a pair consisting of the delimiter that terminated the
string and the number of characters read.  If reading stopped
at the end of file, the delimiter returned is the
@var{eof-object}; if the string was filled without encountering
a delimiter, this value is @code{#f}.
@end deffn

%read-line
@c snarfed from rdelim.c:113
@deffn {Scheme Procedure} %read-line [port]
Read a newline-terminated line from @var{port}, allocating storage as
necessary.  The newline terminator (if any) is removed from the string,
and a pair consisting of the line and its delimiter is returned.  The
delimiter may be either a newline or the @var{eof-object}; if
@code{%read-line} is called at the end of file, it returns the pair
@code{(#<eof> . #<eof>)}.
@end deffn

write-line
@c snarfed from rdelim.c:188
@deffn {Scheme Procedure} write-line obj [port]
Display @var{obj} and a newline character to @var{port}.  If
@var{port} is not specified, @code{(current-output-port)} is
used.  This procedure is equivalent to:
@lisp
(display obj [port])
(newline [port])
@end lisp
@end deffn

read-options-interface
@c snarfed from read.c:123
@deffn {Scheme Procedure} read-options-interface [setting]
Option interface for the read options. Instead of using
this procedure directly, use the procedures @code{read-enable},
@code{read-disable}, @code{read-set!} and @code{read-options}.
@end deffn

primitive-read
@c snarfed from read.c:1522
@deffn {Scheme Procedure} primitive-read [port]
Read an s-expression from the input port @var{port}, or from
the current input port if @var{port} is not specified.
Any whitespace before the next token is discarded.
@end deffn

read-hash-extend
@c snarfed from read.c:1578
@deffn {Scheme Procedure} read-hash-extend chr proc
Install the procedure @var{proc} for reading expressions
starting with the character sequence @code{#} and @var{chr}.
@var{proc} will be called with two arguments:  the character
@var{chr} and the port to read further data from. The object
returned will be the return value of @code{read}. 
Passing @code{#f} for @var{proc} will remove a previous setting. 

@end deffn

file-encoding
@c snarfed from read.c:1801
@deffn {Scheme Procedure} file-encoding port
Scans the port for an Emacs-like character coding declaration
near the top of the contents of a port with random-accessible contents.
The coding declaration is of the form
@code{coding: XXXXX} and must appear in a scheme comment.

Returns a string containing the character encoding of the file
if a declaration was found, or @code{#f} otherwise.

@end deffn

read-string!/partial
@c snarfed from rw.c:68
@deffn {Scheme Procedure} read-string!/partial str [port_or_fdes [start [end]]]
Read characters from a port or file descriptor into a
string @var{str}.  A port must have an underlying file
descriptor --- a so-called fport.  This procedure is
scsh-compatible and can efficiently read large strings.
It will:

@itemize
@item
attempt to fill the entire string, unless the @var{start}
and/or @var{end} arguments are supplied.  i.e., @var{start}
defaults to 0 and @var{end} defaults to
@code{(string-length str)}
@item
use the current input port if @var{port_or_fdes} is not
supplied.
@item
return fewer than the requested number of characters in some
cases, e.g., on end of file, if interrupted by a signal, or if
not all the characters are immediately available.
@item
wait indefinitely for some input if no characters are
currently available,
unless the port is in non-blocking mode.
@item
read characters from the port's input buffers if available,
instead from the underlying file descriptor.
@item
return @code{#f} if end-of-file is encountered before reading
any characters, otherwise return the number of characters
read.
@item
return 0 if the port is in non-blocking mode and no characters
are immediately available.
@item
return 0 if the request is for 0 bytes, with no
end-of-file check.
@end itemize
@end deffn

write-string/partial
@c snarfed from rw.c:170
@deffn {Scheme Procedure} write-string/partial str [port_or_fdes [start [end]]]
Write characters from a string @var{str} to a port or file
descriptor.  A port must have an underlying file descriptor
--- a so-called fport.  This procedure is
scsh-compatible and can efficiently write large strings.
It will:

@itemize
@item
attempt to write the entire string, unless the @var{start}
and/or @var{end} arguments are supplied.  i.e., @var{start}
defaults to 0 and @var{end} defaults to
@code{(string-length str)}
@item
use the current output port if @var{port_of_fdes} is not
supplied.
@item
in the case of a buffered port, store the characters in the
port's output buffer, if all will fit.  If they will not fit
then any existing buffered characters will be flushed
before attempting
to write the new characters directly to the underlying file
descriptor.  If the port is in non-blocking mode and
buffered characters can not be flushed immediately, then an
@code{EAGAIN} system-error exception will be raised (Note:
scsh does not support the use of non-blocking buffered ports.)
@item
write fewer than the requested number of
characters in some cases, e.g., if interrupted by a signal or
if not all of the output can be accepted immediately.
@item
wait indefinitely for at least one character
from @var{str} to be accepted by the port, unless the port is
in non-blocking mode.
@item
return the number of characters accepted by the port.
@item
return 0 if the port is in non-blocking mode and can not accept
at least one character from @var{str} immediately
@item
return 0 immediately if the request size is 0 bytes.
@end itemize
@end deffn

sigaction
@c snarfed from scmsigs.c:394
@deffn {Scheme Procedure} sigaction signum [handler [flags [thread]]]
Install or report the signal handler for a specified signal.

@var{signum} is the signal number, which can be specified using the value
of variables such as @code{SIGINT}.

If @var{handler} is omitted, @code{sigaction} returns a pair: the
CAR is the current
signal handler, which will be either an integer with the value @code{SIG_DFL}
(default action) or @code{SIG_IGN} (ignore), or the Scheme procedure which
handles the signal, or @code{#f} if a non-Scheme procedure handles the
signal.  The CDR contains the current @code{sigaction} flags for the handler.

If @var{handler} is provided, it is installed as the new handler for
@var{signum}.  @var{handler} can be a Scheme procedure taking one
argument, or the value of @code{SIG_DFL} (default action) or
@code{SIG_IGN} (ignore), or @code{#f} to restore whatever signal handler
was installed before @code{sigaction} was first used.  When
a scheme procedure has been specified, that procedure will run
in the given @var{thread}.   When no thread has been given, the
thread that made this call to @code{sigaction} is used.
Flags can optionally be specified for the new handler.
The return value is a pair with information about the
old handler as described above.

This interface does not provide access to the "signal blocking"
facility.  Maybe this is not needed, since the thread support may
provide solutions to the problem of consistent access to data
structures.
@end deffn

restore-signals
@c snarfed from scmsigs.c:592
@deffn {Scheme Procedure} restore-signals
Return all signal handlers to the values they had before any call to
@code{sigaction} was made.  The return value is unspecified.
@end deffn

alarm
@c snarfed from scmsigs.c:624
@deffn {Scheme Procedure} alarm i
Set a timer to raise a @code{SIGALRM} signal after the specified
number of seconds (an integer).  It's advisable to install a signal
handler for
@code{SIGALRM} beforehand, since the default action is to terminate
the process.

The return value indicates the time remaining for the previous alarm,
if any.  The new value replaces the previous alarm.  If there was
no previous alarm, the return value is zero.
@end deffn

setitimer
@c snarfed from scmsigs.c:659
@deffn {Scheme Procedure} setitimer which_timer interval_seconds interval_microseconds value_seconds value_microseconds
Set the timer specified by @var{which_timer} according to the given
@var{interval_seconds}, @var{interval_microseconds},
@var{value_seconds}, and @var{value_microseconds} values.

Return information about the timer's previous setting.
Errors are handled as described in the guile info pages under ``POSIX
Interface Conventions''.

The timers available are: @code{ITIMER_REAL}, @code{ITIMER_VIRTUAL},
and @code{ITIMER_PROF}.

The return value will be a list of two cons pairs representing the
current state of the given timer.  The first pair is the seconds and
microseconds of the timer @code{it_interval}, and the second pair is
the seconds and microseconds of the timer @code{it_value}.
@code{ITIMER_PROF} or @code{ITIMER_VIRTUAL} are not supported on
some platforms and will always error. @code{(provided? 'ITIMER_PROF)}
and @code{(provided? 'ITIMER_VIRTUAL)} report whether those timers
are supported.

@end deffn

getitimer
@c snarfed from scmsigs.c:708
@deffn {Scheme Procedure} getitimer which_timer
Return information about the timer specified by @var{which_timer}
Errors are handled as described in the guile info pages under ``POSIX
Interface Conventions''.

The timers available are: @code{ITIMER_REAL}, @code{ITIMER_VIRTUAL},
and @code{ITIMER_PROF}.

The return value will be a list of two cons pairs representing the
current state of the given timer.  The first pair is the seconds and
microseconds of the timer @code{it_interval}, and the second pair is
the seconds and microseconds of the timer @code{it_value}.
@code{ITIMER_PROF} or @code{ITIMER_VIRTUAL} are not supported on
some platforms and will always error. @code{(provided? 'ITIMER_PROF)}
and @code{(provided? 'ITIMER_VIRTUAL)} report whether those timers
are supported.

@end deffn

pause
@c snarfed from scmsigs.c:749
@deffn {Scheme Procedure} pause
Pause the current process (thread?) until a signal arrives whose
action is to either terminate the current process or invoke a
handler procedure.  The return value is unspecified.
@end deffn

sleep
@c snarfed from scmsigs.c:762
@deffn {Scheme Procedure} sleep i
Wait for the given number of seconds (an integer) or until a signal
arrives.  The return value is zero if the time elapses or the number
of seconds remaining otherwise.

See also @code{usleep}.
@end deffn

usleep
@c snarfed from scmsigs.c:775
@deffn {Scheme Procedure} usleep i
Wait the given period @var{usecs} microseconds (an integer).
If a signal arrives the wait stops and the return value is the
time remaining, in microseconds.  If the period elapses with no
signal the return is zero.

On most systems the process scheduler is not microsecond accurate and
the actual period slept by @code{usleep} may be rounded to a system
clock tick boundary.  Traditionally such ticks were 10 milliseconds
apart, and that interval is often still used.

See also @code{sleep}.
@end deffn

raise
@c snarfed from scmsigs.c:794
@deffn {Scheme Procedure} raise sig
Sends a specified signal @var{sig} to the current process, where
@var{sig} is as described for the kill procedure.
@end deffn

system
@c snarfed from simpos.c:39
@deffn {Scheme Procedure} system [cmd]
Execute @var{cmd} using the operating system's "command
processor".  Under Unix this is usually the default shell
@code{sh}.  The value returned is @var{cmd}'s exit status as
returned by @code{waitpid}, which can be interpreted using
@code{status:exit-val} and friends.

If @code{system} is called without arguments, return a boolean
indicating whether the command processor is available.
@end deffn

getenv
@c snarfed from simpos.c:71
@deffn {Scheme Procedure} getenv nam
Looks up the string @var{nam} in the current environment.  The return
value is @code{#f} unless a string of the form @code{NAME=VALUE} is
found, in which case the string @code{VALUE} is returned.
@end deffn

primitive-exit
@c snarfed from simpos.c:102
@deffn {Scheme Procedure} primitive-exit [status]
Terminate the current process without unwinding the Scheme
stack.  The exit status is @var{status} if supplied, otherwise
zero.
@end deffn

primitive-_exit
@c snarfed from simpos.c:116
@deffn {Scheme Procedure} primitive-_exit [status]
Terminate the current process using the _exit() system call and
without unwinding the Scheme stack.  The exit status is
@var{status} if supplied, otherwise zero.

This function is typically useful after a fork, to ensure no
Scheme cleanups or @code{atexit} handlers are run (those
usually belonging in the parent rather than the child).
@end deffn

restricted-vector-sort!
@c snarfed from sort.c:74
@deffn {Scheme Procedure} restricted-vector-sort! vec less startpos endpos
Sort the vector @var{vec}, using @var{less} for comparing
the vector elements.  @var{startpos} (inclusively) and
@var{endpos} (exclusively) delimit
the range of the vector which gets sorted.  The return value
is not specified.
@end deffn

sorted?
@c snarfed from sort.c:124
@deffn {Scheme Procedure} sorted? items less
Return @code{#t} iff @var{items} is a list or vector such that, for each element @var{x} and the next element @var{y} of @var{items}, @code{(@var{less} @var{y} @var{x})} returns @code{#f}.
@end deffn

merge
@c snarfed from sort.c:215
@deffn {Scheme Procedure} merge alist blist less
Merge two already sorted lists into one.
Given two lists @var{alist} and @var{blist}, such that
@code{(sorted? alist less?)} and @code{(sorted? blist less?)},
return a new list in which the elements of @var{alist} and
@var{blist} have been stably interleaved so that
@code{(sorted? (merge alist blist less?) less?)}.
Note:  this does _not_ accept vectors.
@end deffn

merge!
@c snarfed from sort.c:331
@deffn {Scheme Procedure} merge! alist blist less
Takes two lists @var{alist} and @var{blist} such that
@code{(sorted? alist less?)} and @code{(sorted? blist less?)} and
returns a new list in which the elements of @var{alist} and
@var{blist} have been stably interleaved so that
 @code{(sorted? (merge alist blist less?) less?)}.
This is the destructive variant of @code{merge}
Note:  this does _not_ accept vectors.
@end deffn

sort!
@c snarfed from sort.c:410
@deffn {Scheme Procedure} sort! items less
Sort the sequence @var{items}, which may be a list or a
vector.  @var{less} is used for comparing the sequence
elements.  The sorting is destructive, that means that the
input sequence is modified to produce the sorted result.
This is not a stable sort.
@end deffn

sort
@c snarfed from sort.c:456
@deffn {Scheme Procedure} sort items less
Sort the sequence @var{items}, which may be a list or a
vector.  @var{less} is used for comparing the sequence
elements.  This is not a stable sort.
@end deffn

stable-sort!
@c snarfed from sort.c:542
@deffn {Scheme Procedure} stable-sort! items less
Sort the sequence @var{items}, which may be a list or a
vector. @var{less} is used for comparing the sequence elements.
The sorting is destructive, that means that the input sequence
is modified to produce the sorted result.
This is a stable sort.
@end deffn

stable-sort
@c snarfed from sort.c:594
@deffn {Scheme Procedure} stable-sort items less
Sort the sequence @var{items}, which may be a list or a
vector. @var{less} is used for comparing the sequence elements.
This is a stable sort.
@end deffn

sort-list!
@c snarfed from sort.c:612
@deffn {Scheme Procedure} sort-list! items less
Sort the list @var{items}, using @var{less} for comparing the
list elements. The sorting is destructive, that means that the
input list is modified to produce the sorted result.
This is a stable sort.
@end deffn

sort-list
@c snarfed from sort.c:630
@deffn {Scheme Procedure} sort-list items less
Sort the list @var{items}, using @var{less} for comparing the
list elements. This is a stable sort.
@end deffn

supports-source-properties?
@c snarfed from srcprop.c:138
@deffn {Scheme Procedure} supports-source-properties? obj
Return #t if @var{obj} supports adding source properties,
otherwise return #f.
@end deffn

source-properties
@c snarfed from srcprop.c:148
@deffn {Scheme Procedure} source-properties obj
Return the source property association list of @var{obj}.
@end deffn

set-source-properties!
@c snarfed from srcprop.c:173
@deffn {Scheme Procedure} set-source-properties! obj alist
Install the association list @var{alist} as the source property
list for @var{obj}.
@end deffn

source-property
@c snarfed from srcprop.c:210
@deffn {Scheme Procedure} source-property obj key
Return the source property specified by @var{key} from
@var{obj}'s source property list.
@end deffn

set-source-property!
@c snarfed from srcprop.c:243
@deffn {Scheme Procedure} set-source-property! obj key datum
Set the source property of object @var{obj}, which is specified by
@var{key} to @var{datum}.  Normally, the key will be a symbol.
@end deffn

cons-source
@c snarfed from srcprop.c:297
@deffn {Scheme Procedure} cons-source xorig x y
Create and return a new pair whose car and cdr are @var{x} and @var{y}.
Any source properties associated with @var{xorig} are also associated
with the new pair.
@end deffn

append-reverse
@c snarfed from srfi-1.c:89
@deffn {Scheme Procedure} append-reverse revhead tail
Reverse @var{rev-head}, append @var{tail} to it, and return the
result.  This is equivalent to @code{(append (reverse
@var{rev-head}) @var{tail})}, but its implementation is more
efficient.

@example
(append-reverse '(1 2 3) '(4 5 6)) @result{} (3 2 1 4 5 6)
@end example
@end deffn

append-reverse!
@c snarfed from srfi-1.c:114
@deffn {Scheme Procedure} append-reverse! revhead tail
Reverse @var{rev-head}, append @var{tail} to it, and return the
result.  This is equivalent to @code{(append! (reverse!
@var{rev-head}) @var{tail})}, but its implementation is more
efficient.

@example
(append-reverse! (list 1 2 3) '(4 5 6)) @result{} (3 2 1 4 5 6)
@end example

@var{rev-head} may be modified in order to produce the result.
@end deffn

concatenate
@c snarfed from srfi-1.c:146
@deffn {Scheme Procedure} concatenate lstlst
Construct a list by appending all lists in @var{lstlst}.

@code{concatenate} is the same as @code{(apply append
@var{lstlst})}.  It exists because some Scheme implementations
have a limit on the number of arguments a function takes, which
the @code{apply} might exceed.  In Guile there is no such
limit.
@end deffn

concatenate!
@c snarfed from srfi-1.c:163
@deffn {Scheme Procedure} concatenate! lstlst
Construct a list by appending all lists in @var{lstlst}.  Those
lists may be modified to produce the result.

@code{concatenate!} is the same as @code{(apply append!
@var{lstlst})}.  It exists because some Scheme implementations
have a limit on the number of arguments a function takes, which
the @code{apply} might exceed.  In Guile there is no such
limit.
@end deffn

count
@c snarfed from srfi-1.c:181
@deffn {Scheme Procedure} count pred list1 . rest
Return a count of the number of times @var{pred} returns true
when called on elements from the given lists.

@var{pred} is called with @var{N} parameters @code{(@var{pred}
@var{elem1} @dots{} @var{elemN})}, each element being from the
corresponding @var{list1} @dots{} @var{lstN}.  The first call is
with the first element of each list, the second with the second
element from each, and so on.

Counting stops when the end of the shortest list is reached.
At least one list must be non-circular.
@end deffn

delete
@c snarfed from srfi-1.c:280
@deffn {Scheme Procedure} delete x lst [pred]
Return a list containing the elements of @var{lst} but with
those equal to @var{x} deleted.  The returned elements will be
in the same order as they were in @var{lst}.

Equality is determined by @var{pred}, or @code{equal?} if not
given.  An equality call is made just once for each element,
but the order in which the calls are made on the elements is
unspecified.

The equality calls are always @code{(pred x elem)}, ie.@: the
given @var{x} is first.  This means for instance elements
greater than 5 can be deleted with @code{(delete 5 lst <)}.

@var{lst} is not modified, but the returned list might share a
common tail with @var{lst}.
@end deffn

delete!
@c snarfed from srfi-1.c:348
@deffn {Scheme Procedure} delete! x lst [pred]
Return a list containing the elements of @var{lst} but with
those equal to @var{x} deleted.  The returned elements will be
in the same order as they were in @var{lst}.

Equality is determined by @var{pred}, or @code{equal?} if not
given.  An equality call is made just once for each element,
but the order in which the calls are made on the elements is
unspecified.

The equality calls are always @code{(pred x elem)}, ie.@: the
given @var{x} is first.  This means for instance elements
greater than 5 can be deleted with @code{(delete 5 lst <)}.

@var{lst} may be modified to construct the returned list.
@end deffn

delete-duplicates
@c snarfed from srfi-1.c:391
@deffn {Scheme Procedure} delete-duplicates lst [pred]
Return a list containing the elements of @var{lst} but without
duplicates.

When elements are equal, only the first in @var{lst} is
retained.  Equal elements can be anywhere in @var{lst}, they
don't have to be adjacent.  The returned list will have the
retained elements in the same order as they were in @var{lst}.

Equality is determined by @var{pred}, or @code{equal?} if not
given.  Calls @code{(pred x y)} are made with element @var{x}
being before @var{y} in @var{lst}.  A call is made at most once
for each combination, but the sequence of the calls across the
elements is unspecified.

@var{lst} is not modified, but the return might share a common
tail with @var{lst}.

In the worst case, this is an @math{O(N^2)} algorithm because
it must check each element against all those preceding it.  For
long lists it is more efficient to sort and then compare only
adjacent elements.
@end deffn

delete-duplicates!
@c snarfed from srfi-1.c:496
@deffn {Scheme Procedure} delete-duplicates! lst [pred]
Return a list containing the elements of @var{lst} but without
duplicates.

When elements are equal, only the first in @var{lst} is
retained.  Equal elements can be anywhere in @var{lst}, they
don't have to be adjacent.  The returned list will have the
retained elements in the same order as they were in @var{lst}.

Equality is determined by @var{pred}, or @code{equal?} if not
given.  Calls @code{(pred x y)} are made with element @var{x}
being before @var{y} in @var{lst}.  A call is made at most once
for each combination, but the sequence of the calls across the
elements is unspecified.

@var{lst} may be modified to construct the returned list.

In the worst case, this is an @math{O(N^2)} algorithm because
it must check each element against all those preceding it.  For
long lists it is more efficient to sort and then compare only
adjacent elements.
@end deffn

length+
@c snarfed from srfi-1.c:578
@deffn {Scheme Procedure} length+ lst
Return the length of @var{lst}, or @code{#f} if @var{lst} is
circular.
@end deffn

list-copy
@c snarfed from srfi-1.c:625
@deffn {Scheme Procedure} list-copy lst
Return a copy of the given list @var{lst}.

@var{lst} can be a proper or improper list.  And if @var{lst}
is not a pair then it's treated as the final tail of an
improper list and simply returned.
@end deffn

lset-difference!
@c snarfed from srfi-1.c:654
@deffn {Scheme Procedure} lset-difference! equal lst . rest
Return @var{lst} with any elements in the lists in @var{rest}
removed (ie.@: subtracted).  For only one @var{lst} argument,
just that list is returned.

The given @var{equal} procedure is used for comparing elements,
called as @code{(@var{equal} elem1 elemN)}.  The first argument
is from @var{lst} and the second from one of the subsequent
lists.  But exactly which calls are made and in what order is
unspecified.

@example
(lset-difference! eqv? (list 'x 'y))           @result{} (x y)
(lset-difference! eqv? (list 1 2 3) '(3 1))    @result{} (2)
(lset-difference! eqv? (list 1 2 3) '(3) '(2)) @result{} (1)
@end example

@code{lset-difference!} may modify @var{lst} to form its
result.
@end deffn

partition
@c snarfed from srfi-1.c:713
@deffn {Scheme Procedure} partition pred list
Partition the elements of @var{list} with predicate @var{pred}.
Return two values: the list of elements satisfying @var{pred} and
the list of elements @emph{not} satisfying @var{pred}.  The order
of the output lists follows the order of @var{list}.  @var{list}
is not mutated.  One of the output lists may share memory with @var{list}.

@end deffn

partition!
@c snarfed from srfi-1.c:755
@deffn {Scheme Procedure} partition! pred lst
Split @var{lst} into those elements which do and don't satisfy
the predicate @var{pred}.

The return is two values (@pxref{Multiple Values}), the first
being a list of all elements from @var{lst} which satisfy
@var{pred}, the second a list of those which do not.

The elements in the result lists are in the same order as in
@var{lst} but the order in which the calls @code{(@var{pred}
elem)} are made on the list elements is unspecified.

@var{lst} may be modified to construct the return lists.
@end deffn

remove
@c snarfed from srfi-1.c:808
@deffn {Scheme Procedure} remove pred list
Return a list containing all elements from @var{list} which do
not satisfy the predicate @var{pred}.  The elements in the
result list have the same order as in @var{list}.  The order in
which @var{pred} is applied to the list elements is not
specified.
@end deffn

remove!
@c snarfed from srfi-1.c:839
@deffn {Scheme Procedure} remove! pred list
Return a list containing all elements from @var{list} which do
not satisfy the predicate @var{pred}.  The elements in the
result list have the same order as in @var{list}.  The order in
which @var{pred} is applied to the list elements is not
specified.  @var{list} may be modified to build the return
list.
@end deffn

make-srfi-4-vector
@c snarfed from srfi-4.c:224
@deffn {Scheme Procedure} make-srfi-4-vector type len [fill]
Make a srfi-4 vector
@end deffn

srfi-4-vector-type-size
@c snarfed from srfi-4.c:281
@deffn {Scheme Procedure} srfi-4-vector-type-size vec
Return the size, in bytes, of each element of a srfi-4 vector.
@end deffn

string-null?
@c snarfed from srfi-13.c:65
@deffn {Scheme Procedure} string-null? str
Return @code{#t} if @var{str}'s length is zero, and
@code{#f} otherwise.
@lisp
(string-null? "")  @result{} #t
y                    @result{} "foo"
(string-null? y)     @result{} #f
@end lisp
@end deffn

string-any-c-code
@c snarfed from srfi-13.c:89
@deffn {Scheme Procedure} string-any-c-code char_pred s [start [end]]
Check if @var{char_pred} is true for any character in string @var{s}.

@var{char_pred} can be a character to check for any equal to that, or
a character set (@pxref{Character Sets}) to check for any in that set,
or a predicate procedure to call.

For a procedure, calls @code{(@var{char_pred} c)} are made
successively on the characters from @var{start} to @var{end}.  If
@var{char_pred} returns true (ie.@: non-@code{#f}), @code{string-any}
stops and that return value is the return from @code{string-any}.  The
call on the last character (ie.@: at @math{@var{end}-1}), if that
point is reached, is a tail call.

If there are no characters in @var{s} (ie.@: @var{start} equals
@var{end}) then the return is @code{#f}.

@end deffn

string-every-c-code
@c snarfed from srfi-13.c:156
@deffn {Scheme Procedure} string-every-c-code char_pred s [start [end]]
Check if @var{char_pred} is true for every character in string
@var{s}.

@var{char_pred} can be a character to check for every character equal
to that, or a character set (@pxref{Character Sets}) to check for
every character being in that set, or a predicate procedure to call.

For a procedure, calls @code{(@var{char_pred} c)} are made
successively on the characters from @var{start} to @var{end}.  If
@var{char_pred} returns @code{#f}, @code{string-every} stops and
returns @code{#f}.  The call on the last character (ie.@: at
@math{@var{end}-1}), if that point is reached, is a tail call and the
return from that call is the return from @code{string-every}.

If there are no characters in @var{s} (ie.@: @var{start} equals
@var{end}) then the return is @code{#t}.

@end deffn

string-tabulate
@c snarfed from srfi-13.c:223
@deffn {Scheme Procedure} string-tabulate proc len
@var{proc} is an integer->char procedure.  Construct a string
of size @var{len} by applying @var{proc} to each index to
produce the corresponding string element.  The order in which
@var{proc} is applied to the indices is not specified.
@end deffn

string->list
@c snarfed from srfi-13.c:281
@deffn {Scheme Procedure} string->list str [start [end]]
Convert the string @var{str} into a list of characters.
@end deffn

reverse-list->string
@c snarfed from srfi-13.c:331
@deffn {Scheme Procedure} reverse-list->string chrs
An efficient implementation of @code{(compose list->string
reverse)}:

@smalllisp
(reverse-list->string '(#\a #\B #\c)) @result{} "cBa"
@end smalllisp
@end deffn

string-join
@c snarfed from srfi-13.c:383
@deffn {Scheme Procedure} string-join ls [delimiter [grammar]]
Append the string in the string list @var{ls}, using the string
@var{delimiter} as a delimiter between the elements of @var{ls}.
@var{delimiter} defaults to @w{@samp{ }}, that is, strings in @var{ls}
are appended with the space character in between them.  @var{grammar} is
a symbol which specifies how the delimiter is placed between the
strings, and defaults to the symbol @code{infix}.

@table @code
@item infix
Insert the separator between list elements.  An empty string
will produce an empty list.
@item strict-infix
Like @code{infix}, but will raise an error if given the empty
list.
@item suffix
Insert the separator after every list element.
@item prefix
Insert the separator before each list element.
@end table
@end deffn

string-copy
@c snarfed from srfi-13.c:507
@deffn {Scheme Procedure} string-copy str [start [end]]
Return a freshly allocated copy of the string @var{str}.  If
given, @var{start} and @var{end} delimit the portion of
@var{str} which is copied.
@end deffn

string-copy!
@c snarfed from srfi-13.c:532
@deffn {Scheme Procedure} string-copy! target tstart s [start [end]]
Copy the sequence of characters from index range [@var{start},
@var{end}) in string @var{s} to string @var{target}, beginning
at index @var{tstart}.  The characters are copied left-to-right
or right-to-left as needed -- the copy is guaranteed to work,
even if @var{target} and @var{s} are the same string.  It is an
error if the copy operation runs off the end of the target
string.
@end deffn

substring-move!
@c snarfed from srfi-13.c:578
@deffn {Scheme Procedure} substring-move! str1 start1 end1 str2 start2
Copy the substring of @var{str1} bounded by @var{start1} and @var{end1}
into @var{str2} beginning at position @var{start2}.
@var{str1} and @var{str2} can be the same string.
@end deffn

string-take
@c snarfed from srfi-13.c:589
@deffn {Scheme Procedure} string-take s n
Return the @var{n} first characters of @var{s}.
@end deffn

string-drop
@c snarfed from srfi-13.c:599
@deffn {Scheme Procedure} string-drop s n
Return all but the first @var{n} characters of @var{s}.
@end deffn

string-take-right
@c snarfed from srfi-13.c:609
@deffn {Scheme Procedure} string-take-right s n
Return the @var{n} last characters of @var{s}.
@end deffn

string-drop-right
@c snarfed from srfi-13.c:621
@deffn {Scheme Procedure} string-drop-right s n
Return all but the last @var{n} characters of @var{s}.
@end deffn

string-pad
@c snarfed from srfi-13.c:633
@deffn {Scheme Procedure} string-pad s len [chr [start [end]]]
Take that characters from @var{start} to @var{end} from the
string @var{s} and return a new string, right-padded by the
character @var{chr} to length @var{len}.  If the resulting
string is longer than @var{len}, it is truncated on the right.
@end deffn

string-pad-right
@c snarfed from srfi-13.c:668
@deffn {Scheme Procedure} string-pad-right s len [chr [start [end]]]
Take that characters from @var{start} to @var{end} from the
string @var{s} and return a new string, left-padded by the
character @var{chr} to length @var{len}.  If the resulting
string is longer than @var{len}, it is truncated on the left.
@end deffn

string-trim
@c snarfed from srfi-13.c:705
@deffn {Scheme Procedure} string-trim s [char_pred [start [end]]]
Trim @var{s} by skipping over all characters on the left
that satisfy the parameter @var{char_pred}:

@itemize @bullet
@item
if it is the character @var{ch}, characters equal to
@var{ch} are trimmed,

@item
if it is a procedure @var{pred} characters that
satisfy @var{pred} are trimmed,

@item
if it is a character set, characters in that set are trimmed.
@end itemize

If called without a @var{char_pred} argument, all whitespace is
trimmed.
@end deffn

string-trim-right
@c snarfed from srfi-13.c:780
@deffn {Scheme Procedure} string-trim-right s [char_pred [start [end]]]
Trim @var{s} by skipping over all characters on the right
that satisfy the parameter @var{char_pred}:

@itemize @bullet
@item
if it is the character @var{ch}, characters equal to @var{ch}
are trimmed,

@item
if it is a procedure @var{pred} characters that satisfy
@var{pred} are trimmed,

@item
if it is a character sets, all characters in that set are
trimmed.
@end itemize

If called without a @var{char_pred} argument, all whitespace is
trimmed.
@end deffn

string-trim-both
@c snarfed from srfi-13.c:856
@deffn {Scheme Procedure} string-trim-both s [char_pred [start [end]]]
Trim @var{s} by skipping over all characters on both sides of
the string that satisfy the parameter @var{char_pred}:

@itemize @bullet
@item
if it is the character @var{ch}, characters equal to @var{ch}
are trimmed,

@item
if it is a procedure @var{pred} characters that satisfy
@var{pred} are trimmed,

@item
if it is a character set, the characters in the set are
trimmed.
@end itemize

If called without a @var{char_pred} argument, all whitespace is
trimmed.
@end deffn

string-fill!
@c snarfed from srfi-13.c:959
@deffn {Scheme Procedure} string-fill! str chr [start [end]]
Stores @var{chr} in every element of the given @var{str} and
returns an unspecified value.
@end deffn

string-compare
@c snarfed from srfi-13.c:1007
@deffn {Scheme Procedure} string-compare s1 s2 proc_lt proc_eq proc_gt [start1 [end1 [start2 [end2]]]]
Apply @var{proc_lt}, @var{proc_eq}, @var{proc_gt} to the
mismatch index, depending upon whether @var{s1} is less than,
equal to, or greater than @var{s2}.  The mismatch index is the
largest index @var{i} such that for every 0 <= @var{j} <
@var{i}, @var{s1}[@var{j}] = @var{s2}[@var{j}] -- that is,
@var{i} is the first position that does not match.
@end deffn

string-compare-ci
@c snarfed from srfi-13.c:1061
@deffn {Scheme Procedure} string-compare-ci s1 s2 proc_lt proc_eq proc_gt [start1 [end1 [start2 [end2]]]]
Apply @var{proc_lt}, @var{proc_eq}, @var{proc_gt} to the
mismatch index, depending upon whether @var{s1} is less than,
equal to, or greater than @var{s2}.  The mismatch index is the
largest index @var{i} such that for every 0 <= @var{j} <
@var{i}, @var{s1}[@var{j}] = @var{s2}[@var{j}] -- that is,
@var{i} is the first position where the lowercased letters 
do not match.

@end deffn

string=
@c snarfed from srfi-13.c:1184
@deffn {Scheme Procedure} string= s1 s2 [start1 [end1 [start2 [end2]]]]
Return @code{#f} if @var{s1} and @var{s2} are not equal, a true
value otherwise.
@end deffn

string<>
@c snarfed from srfi-13.c:1222
@deffn {Scheme Procedure} string<> s1 s2 [start1 [end1 [start2 [end2]]]]
Return @code{#f} if @var{s1} and @var{s2} are equal, a true
value otherwise.
@end deffn

string<
@c snarfed from srfi-13.c:1235
@deffn {Scheme Procedure} string< s1 s2 [start1 [end1 [start2 [end2]]]]
Return @code{#f} if @var{s1} is greater or equal to @var{s2}, a
true value otherwise.
@end deffn

string>
@c snarfed from srfi-13.c:1248
@deffn {Scheme Procedure} string> s1 s2 [start1 [end1 [start2 [end2]]]]
Return @code{#f} if @var{s1} is less or equal to @var{s2}, a
true value otherwise.
@end deffn

string<=
@c snarfed from srfi-13.c:1261
@deffn {Scheme Procedure} string<= s1 s2 [start1 [end1 [start2 [end2]]]]
Return @code{#f} if @var{s1} is greater to @var{s2}, a true
value otherwise.
@end deffn

string>=
@c snarfed from srfi-13.c:1274
@deffn {Scheme Procedure} string>= s1 s2 [start1 [end1 [start2 [end2]]]]
Return @code{#f} if @var{s1} is less to @var{s2}, a true value
otherwise.
@end deffn

string-ci=
@c snarfed from srfi-13.c:1287
@deffn {Scheme Procedure} string-ci= s1 s2 [start1 [end1 [start2 [end2]]]]
Return @code{#f} if @var{s1} and @var{s2} are not equal, a true
value otherwise.  The character comparison is done
case-insensitively.
@end deffn

string-ci<>
@c snarfed from srfi-13.c:1301
@deffn {Scheme Procedure} string-ci<> s1 s2 [start1 [end1 [start2 [end2]]]]
Return @code{#f} if @var{s1} and @var{s2} are equal, a true
value otherwise.  The character comparison is done
case-insensitively.
@end deffn

string-ci<
@c snarfed from srfi-13.c:1315
@deffn {Scheme Procedure} string-ci< s1 s2 [start1 [end1 [start2 [end2]]]]
Return @code{#f} if @var{s1} is greater or equal to @var{s2}, a
true value otherwise.  The character comparison is done
case-insensitively.
@end deffn

string-ci>
@c snarfed from srfi-13.c:1329
@deffn {Scheme Procedure} string-ci> s1 s2 [start1 [end1 [start2 [end2]]]]
Return @code{#f} if @var{s1} is less or equal to @var{s2}, a
true value otherwise.  The character comparison is done
case-insensitively.
@end deffn

string-ci<=
@c snarfed from srfi-13.c:1343
@deffn {Scheme Procedure} string-ci<= s1 s2 [start1 [end1 [start2 [end2]]]]
Return @code{#f} if @var{s1} is greater to @var{s2}, a true
value otherwise.  The character comparison is done
case-insensitively.
@end deffn

string-ci>=
@c snarfed from srfi-13.c:1357
@deffn {Scheme Procedure} string-ci>= s1 s2 [start1 [end1 [start2 [end2]]]]
Return @code{#f} if @var{s1} is less to @var{s2}, a true value
otherwise.  The character comparison is done
case-insensitively.
@end deffn

string-hash
@c snarfed from srfi-13.c:1370
@deffn {Scheme Procedure} string-hash s [bound [start [end]]]
Compute a hash value for @var{s}.  the optional argument @var{bound} is a non-negative exact integer specifying the range of the hash function. A positive value restricts the return value to the range [0,bound).
@end deffn

string-hash-ci
@c snarfed from srfi-13.c:1387
@deffn {Scheme Procedure} string-hash-ci s [bound [start [end]]]
Compute a hash value for @var{s}.  the optional argument @var{bound} is a non-negative exact integer specifying the range of the hash function. A positive value restricts the return value to the range [0,bound).
@end deffn

string-prefix-length
@c snarfed from srfi-13.c:1402
@deffn {Scheme Procedure} string-prefix-length s1 s2 [start1 [end1 [start2 [end2]]]]
Return the length of the longest common prefix of the two
strings.
@end deffn

string-prefix-length-ci
@c snarfed from srfi-13.c:1435
@deffn {Scheme Procedure} string-prefix-length-ci s1 s2 [start1 [end1 [start2 [end2]]]]
Return the length of the longest common prefix of the two
strings, ignoring character case.
@end deffn

string-suffix-length
@c snarfed from srfi-13.c:1467
@deffn {Scheme Procedure} string-suffix-length s1 s2 [start1 [end1 [start2 [end2]]]]
Return the length of the longest common suffix of the two
strings.
@end deffn

string-suffix-length-ci
@c snarfed from srfi-13.c:1499
@deffn {Scheme Procedure} string-suffix-length-ci s1 s2 [start1 [end1 [start2 [end2]]]]
Return the length of the longest common suffix of the two
strings, ignoring character case.
@end deffn

string-prefix?
@c snarfed from srfi-13.c:1531
@deffn {Scheme Procedure} string-prefix? s1 s2 [start1 [end1 [start2 [end2]]]]
Is @var{s1} a prefix of @var{s2}?
@end deffn

string-prefix-ci?
@c snarfed from srfi-13.c:1563
@deffn {Scheme Procedure} string-prefix-ci? s1 s2 [start1 [end1 [start2 [end2]]]]
Is @var{s1} a prefix of @var{s2}, ignoring character case?
@end deffn

string-suffix?
@c snarfed from srfi-13.c:1596
@deffn {Scheme Procedure} string-suffix? s1 s2 [start1 [end1 [start2 [end2]]]]
Is @var{s1} a suffix of @var{s2}?
@end deffn

string-suffix-ci?
@c snarfed from srfi-13.c:1628
@deffn {Scheme Procedure} string-suffix-ci? s1 s2 [start1 [end1 [start2 [end2]]]]
Is @var{s1} a suffix of @var{s2}, ignoring character case?
@end deffn

string-index
@c snarfed from srfi-13.c:1660
@deffn {Scheme Procedure} string-index s char_pred [start [end]]
Search through the string @var{s} from left to right, returning
the index of the first occurrence of a character which

@itemize @bullet
@item
equals @var{char_pred}, if it is character,

@item
satisfies the predicate @var{char_pred}, if it is a procedure,

@item
is in the set @var{char_pred}, if it is a character set.
@end itemize

Return @code{#f} if no match is found.
@end deffn

string-index-right
@c snarfed from srfi-13.c:1725
@deffn {Scheme Procedure} string-index-right s char_pred [start [end]]
Search through the string @var{s} from right to left, returning
the index of the last occurrence of a character which

@itemize @bullet
@item
equals @var{char_pred}, if it is character,

@item
satisfies the predicate @var{char_pred}, if it is a procedure,

@item
is in the set if @var{char_pred} is a character set.
@end itemize

Return @code{#f} if no match is found.
@end deffn

string-rindex
@c snarfed from srfi-13.c:1790
@deffn {Scheme Procedure} string-rindex s char_pred [start [end]]
Search through the string @var{s} from right to left, returning
the index of the last occurrence of a character which

@itemize @bullet
@item
equals @var{char_pred}, if it is character,

@item
satisfies the predicate @var{char_pred}, if it is a procedure,

@item
is in the set if @var{char_pred} is a character set.
@end itemize

Return @code{#f} if no match is found.
@end deffn

string-skip
@c snarfed from srfi-13.c:1812
@deffn {Scheme Procedure} string-skip s char_pred [start [end]]
Search through the string @var{s} from left to right, returning
the index of the first occurrence of a character which

@itemize @bullet
@item
does not equal @var{char_pred}, if it is character,

@item
does not satisfy the predicate @var{char_pred}, if it is a
procedure,

@item
is not in the set if @var{char_pred} is a character set.
@end itemize
@end deffn

string-skip-right
@c snarfed from srfi-13.c:1878
@deffn {Scheme Procedure} string-skip-right s char_pred [start [end]]
Search through the string @var{s} from right to left, returning
the index of the last occurrence of a character which

@itemize @bullet
@item
does not equal @var{char_pred}, if it is character,

@item
does not satisfy the predicate @var{char_pred}, if it is a
procedure,

@item
is not in the set if @var{char_pred} is a character set.
@end itemize
@end deffn

string-count
@c snarfed from srfi-13.c:1945
@deffn {Scheme Procedure} string-count s char_pred [start [end]]
Return the count of the number of characters in the string
@var{s} which

@itemize @bullet
@item
equals @var{char_pred}, if it is character,

@item
satisfies the predicate @var{char_pred}, if it is a procedure.

@item
is in the set @var{char_pred}, if it is a character set.
@end itemize
@end deffn

string-contains
@c snarfed from srfi-13.c:2010
@deffn {Scheme Procedure} string-contains s1 s2 [start1 [end1 [start2 [end2]]]]
Does string @var{s1} contain string @var{s2}?  Return the index
in @var{s1} where @var{s2} occurs as a substring, or false.
The optional start/end indices restrict the operation to the
indicated substrings.
@end deffn

string-contains-ci
@c snarfed from srfi-13.c:2058
@deffn {Scheme Procedure} string-contains-ci s1 s2 [start1 [end1 [start2 [end2]]]]
Does string @var{s1} contain string @var{s2}?  Return the index
in @var{s1} where @var{s2} occurs as a substring, or false.
The optional start/end indices restrict the operation to the
indicated substrings.  Character comparison is done
case-insensitively.
@end deffn

string-upcase!
@c snarfed from srfi-13.c:2122
@deffn {Scheme Procedure} string-upcase! str [start [end]]
Destructively upcase every character in @code{str}.

@lisp
(string-upcase! y)
@result{} "ARRDEFG"
y
@result{} "ARRDEFG"
@end lisp
@end deffn

string-upcase
@c snarfed from srfi-13.c:2149
@deffn {Scheme Procedure} string-upcase str [start [end]]
Upcase every character in @code{str}.
@end deffn

string-downcase!
@c snarfed from srfi-13.c:2188
@deffn {Scheme Procedure} string-downcase! str [start [end]]
Destructively downcase every character in @var{str}.

@lisp
y
@result{} "ARRDEFG"
(string-downcase! y)
@result{} "arrdefg"
y
@result{} "arrdefg"
@end lisp
@end deffn

string-downcase
@c snarfed from srfi-13.c:2217
@deffn {Scheme Procedure} string-downcase str [start [end]]
Downcase every character in @var{str}.
@end deffn

string-titlecase!
@c snarfed from srfi-13.c:2275
@deffn {Scheme Procedure} string-titlecase! str [start [end]]
Destructively titlecase every first character in a word in
@var{str}.
@end deffn

string-titlecase
@c snarfed from srfi-13.c:2291
@deffn {Scheme Procedure} string-titlecase str [start [end]]
Titlecase every first character in a word in @var{str}.
@end deffn

string-capitalize!
@c snarfed from srfi-13.c:2305
@deffn {Scheme Procedure} string-capitalize! str
Upcase the first character of every word in @var{str}
destructively and return @var{str}.

@lisp
y                      @result{} "hello world"
(string-capitalize! y) @result{} "Hello World"
y                      @result{} "Hello World"
@end lisp
@end deffn

string-capitalize
@c snarfed from srfi-13.c:2322
@deffn {Scheme Procedure} string-capitalize str
Return a freshly allocated string with the characters in
@var{str}, where the first character of every word is
capitalized.
@end deffn

string-reverse
@c snarfed from srfi-13.c:2361
@deffn {Scheme Procedure} string-reverse str [start [end]]
Reverse the string @var{str}.  The optional arguments
@var{start} and @var{end} delimit the region of @var{str} to
operate on.
@end deffn

string-reverse!
@c snarfed from srfi-13.c:2382
@deffn {Scheme Procedure} string-reverse! str [start [end]]
Reverse the string @var{str} in-place.  The optional arguments
@var{start} and @var{end} delimit the region of @var{str} to
operate on.  The return value is unspecified.
@end deffn

string-append/shared
@c snarfed from srfi-13.c:2402
@deffn {Scheme Procedure} string-append/shared . rest
Like @code{string-append}, but the result may share memory
with the argument strings.
@end deffn

string-concatenate
@c snarfed from srfi-13.c:2438
@deffn {Scheme Procedure} string-concatenate ls
Append the elements of @var{ls} (which must be strings)
together into a single string.  Guaranteed to return a freshly
allocated string.
@end deffn

string-concatenate-reverse
@c snarfed from srfi-13.c:2451
@deffn {Scheme Procedure} string-concatenate-reverse ls [final_string [end]]
Without optional arguments, this procedure is equivalent to

@smalllisp
(string-concatenate (reverse ls))
@end smalllisp

If the optional argument @var{final_string} is specified, it is
consed onto the beginning to @var{ls} before performing the
list-reverse and string-concatenate operations.  If @var{end}
is given, only the characters of @var{final_string} up to index
@var{end} are used.

Guaranteed to return a freshly allocated string.
@end deffn

string-concatenate/shared
@c snarfed from srfi-13.c:2479
@deffn {Scheme Procedure} string-concatenate/shared ls
Like @code{string-concatenate}, but the result may share memory
with the strings in the list @var{ls}.
@end deffn

string-concatenate-reverse/shared
@c snarfed from srfi-13.c:2491
@deffn {Scheme Procedure} string-concatenate-reverse/shared ls [final_string [end]]
Like @code{string-concatenate-reverse}, but the result may
share memory with the strings in the @var{ls} arguments.
@end deffn

string-map
@c snarfed from srfi-13.c:2503
@deffn {Scheme Procedure} string-map proc s [start [end]]
@var{proc} is a char->char procedure, it is mapped over
@var{s}.  The order in which the procedure is applied to the
string elements is not specified.
@end deffn

string-map!
@c snarfed from srfi-13.c:2538
@deffn {Scheme Procedure} string-map! proc s [start [end]]
@var{proc} is a char->char procedure, it is mapped over
@var{s}.  The order in which the procedure is applied to the
string elements is not specified.  The string @var{s} is
modified in-place, the return value is not specified.
@end deffn

string-fold
@c snarfed from srfi-13.c:2568
@deffn {Scheme Procedure} string-fold kons knil s [start [end]]
Fold @var{kons} over the characters of @var{s}, with @var{knil}
as the terminating element, from left to right.  @var{kons}
must expect two arguments: The actual character and the last
result of @var{kons}' application.
@end deffn

string-fold-right
@c snarfed from srfi-13.c:2596
@deffn {Scheme Procedure} string-fold-right kons knil s [start [end]]
Fold @var{kons} over the characters of @var{s}, with @var{knil}
as the terminating element, from right to left.  @var{kons}
must expect two arguments: The actual character and the last
result of @var{kons}' application.
@end deffn

string-unfold
@c snarfed from srfi-13.c:2624
@deffn {Scheme Procedure} string-unfold p f g seed [base [make_final]]
@itemize @bullet
@item @var{g} is used to generate a series of @emph{seed}
values from the initial @var{seed}: @var{seed}, (@var{g}
@var{seed}), (@var{g}^2 @var{seed}), (@var{g}^3 @var{seed}),
@dots{}
@item @var{p} tells us when to stop -- when it returns true
when applied to one of these seed values.
@item @var{f} maps each seed value to the corresponding
character in the result string.  These chars are assembled
into the string in a left-to-right order.
@item @var{base} is the optional initial/leftmost portion
of the constructed string; it default to the empty
string.
@item @var{make_final} is applied to the terminal seed
value (on which @var{p} returns true) to produce
the final/rightmost portion of the constructed string.
It defaults to @code{(lambda (x) )}.
@end itemize
@end deffn

string-unfold-right
@c snarfed from srfi-13.c:2690
@deffn {Scheme Procedure} string-unfold-right p f g seed [base [make_final]]
@itemize @bullet
@item @var{g} is used to generate a series of @emph{seed}
values from the initial @var{seed}: @var{seed}, (@var{g}
@var{seed}), (@var{g}^2 @var{seed}), (@var{g}^3 @var{seed}),
@dots{}
@item @var{p} tells us when to stop -- when it returns true
when applied to one of these seed values.
@item @var{f} maps each seed value to the corresponding
character in the result string.  These chars are assembled
into the string in a right-to-left order.
@item @var{base} is the optional initial/rightmost portion
of the constructed string; it default to the empty
string.
@item @var{make_final} is applied to the terminal seed
value (on which @var{p} returns true) to produce
the final/leftmost portion of the constructed string.
It defaults to @code{(lambda (x) )}.
@end itemize
@end deffn

string-for-each
@c snarfed from srfi-13.c:2756
@deffn {Scheme Procedure} string-for-each proc s [start [end]]
@var{proc} is mapped over @var{s} in left-to-right order.  The
return value is not specified.
@end deffn

string-for-each-index
@c snarfed from srfi-13.c:2780
@deffn {Scheme Procedure} string-for-each-index proc s [start [end]]
Call @code{(@var{proc} i)} for each index i in @var{s}, from
left to right.

For example, to change characters to alternately upper and
lower case,

@example
(define str (string-copy "studly"))
(string-for-each-index
    (lambda (i)
      (string-set! str i
        ((if (even? i) char-upcase char-downcase)
         (string-ref str i))))
    str)
str @result{} "StUdLy"
@end example
@end deffn

xsubstring
@c snarfed from srfi-13.c:2819
@deffn {Scheme Procedure} xsubstring s from [to [start [end]]]
This is the @emph{extended substring} procedure that implements
replicated copying of a substring of some string.

@var{s} is a string, @var{start} and @var{end} are optional
arguments that demarcate a substring of @var{s}, defaulting to
0 and the length of @var{s}.  Replicate this substring up and
down index space, in both the positive and negative directions.
@code{xsubstring} returns the substring of this string
beginning at index @var{from}, and ending at @var{to}, which
defaults to @var{from} + (@var{end} - @var{start}).
@end deffn

string-xcopy!
@c snarfed from srfi-13.c:2871
@deffn {Scheme Procedure} string-xcopy! target tstart s sfrom [sto [start [end]]]
Exactly the same as @code{xsubstring}, but the extracted text
is written into the string @var{target} starting at index
@var{tstart}.  The operation is not defined if @code{(eq?
@var{target} @var{s})} or these arguments share storage -- you
cannot copy a string on top of itself.
@end deffn

string-replace
@c snarfed from srfi-13.c:2925
@deffn {Scheme Procedure} string-replace s1 s2 [start1 [end1 [start2 [end2]]]]
Return the string @var{s1}, but with the characters
@var{start1} @dots{} @var{end1} replaced by the characters
@var{start2} @dots{} @var{end2} from @var{s2}.
@end deffn

string-tokenize
@c snarfed from srfi-13.c:2950
@deffn {Scheme Procedure} string-tokenize s [token_set [start [end]]]
Split the string @var{s} into a list of substrings, where each
substring is a maximal non-empty contiguous sequence of
characters from the character set @var{token_set}, which
defaults to @code{char-set:graphic}.
If @var{start} or @var{end} indices are provided, they restrict
@code{string-tokenize} to operating on the indicated substring
of @var{s}.
@end deffn

string-split
@c snarfed from srfi-13.c:3003
@deffn {Scheme Procedure} string-split str char_pred
Split the string @var{str} into a list of the substrings delimited
by appearances of characters that

@itemize @bullet
@item
equal @var{char_pred}, if it is a character,

@item
satisfy the predicate @var{char_pred}, if it is a procedure,

@item
are in the set @var{char_pred}, if it is a character set.
@end itemize

Note that an empty substring between separator characters
will result in an empty string in the result list.

@lisp
(string-split "root:x:0:0:root:/root:/bin/bash" #\:)
@result{}
("root" "x" "0" "0" "root" "/root" "/bin/bash")

(string-split "::" #\:)
@result{}
("" "" "")

(string-split "" #\:)
@result{}
("")
@end lisp
@end deffn

string-filter
@c snarfed from srfi-13.c:3109
@deffn {Scheme Procedure} string-filter char_pred s [start [end]]
Filter the string @var{s}, retaining only those characters
which satisfy @var{char_pred}.

If @var{char_pred} is a procedure, it is applied to each
character as a predicate, if it is a character, it is tested
for equality and if it is a character set, it is tested for
membership.
@end deffn

string-delete
@c snarfed from srfi-13.c:3227
@deffn {Scheme Procedure} string-delete char_pred s [start [end]]
Delete characters satisfying @var{char_pred} from @var{s}.

If @var{char_pred} is a procedure, it is applied to each
character as a predicate, if it is a character, it is tested
for equality and if it is a character set, it is tested for
membership.
@end deffn

char-set?
@c snarfed from srfi-14.c:687
@deffn {Scheme Procedure} char-set? obj
Return @code{#t} if @var{obj} is a character set, @code{#f}
otherwise.
@end deffn

char-set=
@c snarfed from srfi-14.c:698
@deffn {Scheme Procedure} char-set= . char_sets
Return @code{#t} if all given character sets are equal.
@end deffn

char-set<=
@c snarfed from srfi-14.c:727
@deffn {Scheme Procedure} char-set<= . char_sets
Return @code{#t} if every character set @var{char_set}i is a subset
of character set @var{char_set}i+1.
@end deffn

char-set-hash
@c snarfed from srfi-14.c:759
@deffn {Scheme Procedure} char-set-hash cs [bound]
Compute a hash value for the character set @var{cs}.  If
@var{bound} is given and non-zero, it restricts the
returned value to the range 0 @dots{} @var{bound} - 1.
@end deffn

char-set-cursor
@c snarfed from srfi-14.c:795
@deffn {Scheme Procedure} char-set-cursor cs
Return a cursor into the character set @var{cs}.
@end deffn

char-set-ref
@c snarfed from srfi-14.c:822
@deffn {Scheme Procedure} char-set-ref cs cursor
Return the character at the current cursor position
@var{cursor} in the character set @var{cs}.  It is an error to
pass a cursor for which @code{end-of-char-set?} returns true.
@end deffn

char-set-cursor-next
@c snarfed from srfi-14.c:851
@deffn {Scheme Procedure} char-set-cursor-next cs cursor
Advance the character set cursor @var{cursor} to the next
character in the character set @var{cs}.  It is an error if the
cursor given satisfies @code{end-of-char-set?}.
@end deffn

end-of-char-set?
@c snarfed from srfi-14.c:900
@deffn {Scheme Procedure} end-of-char-set? cursor
Return @code{#t} if @var{cursor} has reached the end of a
character set, @code{#f} otherwise.
@end deffn

char-set-fold
@c snarfed from srfi-14.c:918
@deffn {Scheme Procedure} char-set-fold kons knil cs
Fold the procedure @var{kons} over the character set @var{cs},
initializing it with @var{knil}.
@end deffn

char-set-unfold
@c snarfed from srfi-14.c:946
@deffn {Scheme Procedure} char-set-unfold p f g seed [base_cs]
This is a fundamental constructor for character sets.
@itemize @bullet
@item @var{g} is used to generate a series of ``seed'' values
from the initial seed: @var{seed}, (@var{g} @var{seed}),
(@var{g}^2 @var{seed}), (@var{g}^3 @var{seed}), @dots{}
@item @var{p} tells us when to stop -- when it returns true
when applied to one of the seed values.
@item @var{f} maps each seed value to a character. These
characters are added to the base character set @var{base_cs} to
form the result; @var{base_cs} defaults to the empty set.
@end itemize
@end deffn

char-set-unfold!
@c snarfed from srfi-14.c:990
@deffn {Scheme Procedure} char-set-unfold! p f g seed base_cs
This is a fundamental constructor for character sets.
@itemize @bullet
@item @var{g} is used to generate a series of ``seed'' values
from the initial seed: @var{seed}, (@var{g} @var{seed}),
(@var{g}^2 @var{seed}), (@var{g}^3 @var{seed}), @dots{}
@item @var{p} tells us when to stop -- when it returns true
when applied to one of the seed values.
@item @var{f} maps each seed value to a character. These
characters are added to the base character set @var{base_cs} to
form the result; @var{base_cs} defaults to the empty set.
@end itemize
@end deffn

char-set-for-each
@c snarfed from srfi-14.c:1028
@deffn {Scheme Procedure} char-set-for-each proc cs
Apply @var{proc} to every character in the character set
@var{cs}.  The return value is not specified.
@end deffn

char-set-map
@c snarfed from srfi-14.c:1057
@deffn {Scheme Procedure} char-set-map proc cs
Map the procedure @var{proc} over every character in @var{cs}.
@var{proc} must be a character -> character procedure.
@end deffn

char-set-copy
@c snarfed from srfi-14.c:1091
@deffn {Scheme Procedure} char-set-copy cs
Return a newly allocated character set containing all
characters in @var{cs}.
@end deffn

char-set
@c snarfed from srfi-14.c:1120
@deffn {Scheme Procedure} char-set . rest
Return a character set containing all given characters.
@end deffn

list->char-set
@c snarfed from srfi-14.c:1144
@deffn {Scheme Procedure} list->char-set list [base_cs]
Convert the character list @var{list} to a character set.  If
the character set @var{base_cs} is given, the character in this
set are also included in the result.
@end deffn

list->char-set!
@c snarfed from srfi-14.c:1177
@deffn {Scheme Procedure} list->char-set! list base_cs
Convert the character list @var{list} to a character set.  The
characters are added to @var{base_cs} and @var{base_cs} is
returned.
@end deffn

string->char-set
@c snarfed from srfi-14.c:1201
@deffn {Scheme Procedure} string->char-set str [base_cs]
Convert the string @var{str} to a character set.  If the
character set @var{base_cs} is given, the characters in this
set are also included in the result.
@end deffn

string->char-set!
@c snarfed from srfi-14.c:1231
@deffn {Scheme Procedure} string->char-set! str base_cs
Convert the string @var{str} to a character set.  The
characters from the string are added to @var{base_cs}, and
@var{base_cs} is returned.
@end deffn

char-set-filter
@c snarfed from srfi-14.c:1254
@deffn {Scheme Procedure} char-set-filter pred cs [base_cs]
Return a character set containing every character from @var{cs}
so that it satisfies @var{pred}.  If provided, the characters
from @var{base_cs} are added to the result.
@end deffn

char-set-filter!
@c snarfed from srfi-14.c:1294
@deffn {Scheme Procedure} char-set-filter! pred cs base_cs
Return a character set containing every character from @var{cs}
so that it satisfies @var{pred}.  The characters are added to
@var{base_cs} and @var{base_cs} is returned.
@end deffn

ucs-range->char-set
@c snarfed from srfi-14.c:1390
@deffn {Scheme Procedure} ucs-range->char-set lower upper [error [base_cs]]
Return a character set containing all characters whose
character codes lie in the half-open range
[@var{lower},@var{upper}).

If @var{error} is a true value, an error is signaled if the
specified range contains characters which are not valid
Unicode code points.  If @var{error} is @code{#f},
these characters are silently left out of the resulting
character set.

The characters in @var{base_cs} are added to the result, if
given.
@end deffn

ucs-range->char-set!
@c snarfed from srfi-14.c:1412
@deffn {Scheme Procedure} ucs-range->char-set! lower upper error base_cs
Return a character set containing all characters whose
character codes lie in the half-open range
[@var{lower},@var{upper}).

If @var{error} is a true value, an error is signaled if the
specified range contains characters which are not contained in
the implemented character range.  If @var{error} is @code{#f},
these characters are silently left out of the resulting
character set.

The characters are added to @var{base_cs} and @var{base_cs} is
returned.
@end deffn

->char-set
@c snarfed from srfi-14.c:1434
@deffn {Scheme Procedure} ->char-set x
Coerces x into a char-set. @var{x} may be a string, character or char-set. A string is converted to the set of its constituent characters; a character is converted to a singleton set; a char-set is returned as-is.
@end deffn

char-set-size
@c snarfed from srfi-14.c:1450
@deffn {Scheme Procedure} char-set-size cs
Return the number of elements in character set @var{cs}.
@end deffn

char-set-count
@c snarfed from srfi-14.c:1472
@deffn {Scheme Procedure} char-set-count pred cs
Return the number of the elements int the character set
@var{cs} which satisfy the predicate @var{pred}.
@end deffn

char-set->list
@c snarfed from srfi-14.c:1500
@deffn {Scheme Procedure} char-set->list cs
Return a list containing the elements of the character set
@var{cs}.
@end deffn

char-set->string
@c snarfed from srfi-14.c:1524
@deffn {Scheme Procedure} char-set->string cs
Return a string containing the elements of the character set
@var{cs}.  The order in which the characters are placed in the
string is not defined.
@end deffn

char-set-contains?
@c snarfed from srfi-14.c:1568
@deffn {Scheme Procedure} char-set-contains? cs ch
Return @code{#t} iff the character @var{ch} is contained in the
character set @var{cs}.
@end deffn

char-set-every
@c snarfed from srfi-14.c:1581
@deffn {Scheme Procedure} char-set-every pred cs
Return a true value if every character in the character set
@var{cs} satisfies the predicate @var{pred}.
@end deffn

char-set-any
@c snarfed from srfi-14.c:1611
@deffn {Scheme Procedure} char-set-any pred cs
Return a true value if any character in the character set
@var{cs} satisfies the predicate @var{pred}.
@end deffn

char-set-adjoin
@c snarfed from srfi-14.c:1640
@deffn {Scheme Procedure} char-set-adjoin cs . rest
Add all character arguments to the first argument, which must
be a character set.
@end deffn

char-set-delete
@c snarfed from srfi-14.c:1665
@deffn {Scheme Procedure} char-set-delete cs . rest
Delete all character arguments from the first argument, which
must be a character set.
@end deffn

char-set-adjoin!
@c snarfed from srfi-14.c:1690
@deffn {Scheme Procedure} char-set-adjoin! cs . rest
Add all character arguments to the first argument, which must
be a character set.
@end deffn

char-set-delete!
@c snarfed from srfi-14.c:1714
@deffn {Scheme Procedure} char-set-delete! cs . rest
Delete all character arguments from the first argument, which
must be a character set.
@end deffn

char-set-complement
@c snarfed from srfi-14.c:1738
@deffn {Scheme Procedure} char-set-complement cs
Return the complement of the character set @var{cs}.
@end deffn

char-set-union
@c snarfed from srfi-14.c:1757
@deffn {Scheme Procedure} char-set-union . rest
Return the union of all argument character sets.
@end deffn

char-set-intersection
@c snarfed from srfi-14.c:1785
@deffn {Scheme Procedure} char-set-intersection . rest
Return the intersection of all argument character sets.
@end deffn

char-set-difference
@c snarfed from srfi-14.c:1823
@deffn {Scheme Procedure} char-set-difference cs1 . rest
Return the difference of all argument character sets.
@end deffn

char-set-xor
@c snarfed from srfi-14.c:1854
@deffn {Scheme Procedure} char-set-xor . rest
Return the exclusive-or of all argument character sets.
@end deffn

char-set-diff+intersection
@c snarfed from srfi-14.c:1892
@deffn {Scheme Procedure} char-set-diff+intersection cs1 . rest
Return the difference and the intersection of all argument
character sets.
@end deffn

char-set-complement!
@c snarfed from srfi-14.c:1927
@deffn {Scheme Procedure} char-set-complement! cs
Return the complement of the character set @var{cs}.
@end deffn

char-set-union!
@c snarfed from srfi-14.c:1938
@deffn {Scheme Procedure} char-set-union! cs1 . rest
Return the union of all argument character sets.
@end deffn

char-set-intersection!
@c snarfed from srfi-14.c:1952
@deffn {Scheme Procedure} char-set-intersection! cs1 . rest
Return the intersection of all argument character sets.
@end deffn

char-set-difference!
@c snarfed from srfi-14.c:1966
@deffn {Scheme Procedure} char-set-difference! cs1 . rest
Return the difference of all argument character sets.
@end deffn

char-set-xor!
@c snarfed from srfi-14.c:1980
@deffn {Scheme Procedure} char-set-xor! cs1 . rest
Return the exclusive-or of all argument character sets.
@end deffn

char-set-diff+intersection!
@c snarfed from srfi-14.c:1997
@deffn {Scheme Procedure} char-set-diff+intersection! cs1 cs2 . rest
Return the difference and the intersection of all argument
character sets.
@end deffn

%char-set-dump
@c snarfed from srfi-14.c:2055
@deffn {Scheme Procedure} %char-set-dump charset
Returns an association list containing debugging information
for @var{charset}. The association list has the following entries.@table @code
@item char-set
The char-set itself.
@item len
The number of character ranges the char-set contains
@item ranges
A list of lists where each sublist a range of code points
and their associated characters@end table
@end deffn

log2-binary-factors
@c snarfed from srfi-60.c:41
@deffn {Scheme Procedure} log2-binary-factors n
Return a count of how many factors of 2 are present in @var{n}.
This is also the bit index of the lowest 1 bit in @var{n}.  If
@var{n} is 0, the return is @math{-1}.

@example
(log2-binary-factors 6) @result{} 1
(log2-binary-factors -8) @result{} 3
@end example
@end deffn

copy-bit
@c snarfed from srfi-60.c:67
@deffn {Scheme Procedure} copy-bit index n newbit
Return @var{n} with the bit at @var{index} set according to
@var{newbit}.  @var{newbit} should be @code{#t} to set the bit
to 1, or @code{#f} to set it to 0.  Bits other than at
@var{index} are unchanged in the return.

@example
(copy-bit 1 #b0101 #t) @result{} 7
@end example
@end deffn

rotate-bit-field
@c snarfed from srfi-60.c:103
@deffn {Scheme Procedure} rotate-bit-field n count start end
Return @var{n} with the bit field from @var{start} (inclusive)
to @var{end} (exclusive) rotated upwards by @var{count} bits.

@var{count} can be positive or negative, and it can be more
than the field width (it'll be reduced modulo the width).

@example
(rotate-bit-field #b0110 2 1 4) @result{} #b1010
@end example
@end deffn

reverse-bit-field
@c snarfed from srfi-60.c:223
@deffn {Scheme Procedure} reverse-bit-field n start end
Return @var{n} with the bits between @var{start} (inclusive) to
@var{end} (exclusive) reversed.

@example
(reverse-bit-field #b101001 2 4) @result{} #b100101
@end example
@end deffn

integer->list
@c snarfed from srfi-60.c:306
@deffn {Scheme Procedure} integer->list n [len]
Return bits from @var{n} in the form of a list of @code{#t} for
1 and @code{#f} for 0.  The least significant @var{len} bits
are returned, and the first list element is the most
significant of those bits.  If @var{len} is not given, the
default is @code{(integer-length @var{n})} (@pxref{Bitwise
Operations}).

@example
(integer->list 6)   @result{} (#t #t #f)
(integer->list 1 4) @result{} (#f #f #f #t)
@end example
@end deffn

list->integer
@c snarfed from srfi-60.c:348
@deffn {Scheme Procedure} list->integer lst
Return an integer formed bitwise from the given @var{lst} list
of booleans.  Each boolean is @code{#t} for a 1 and @code{#f}
for a 0.  The first element becomes the most significant bit in
the return.

@example
(list->integer '(#t #f #t #f)) @result{} 10
@end example
@end deffn

booleans->integer
@c snarfed from srfi-60.c:403
@deffn {Scheme Procedure} booleans->integer
implemented by the C function "scm_srfi60_list_to_integer"
@end deffn

%get-stack-size
@c snarfed from stackchk.c:73
@deffn {Scheme Procedure} %get-stack-size
Return the current thread's C stack size (in Scheme objects).
@end deffn

stack?
@c snarfed from stacks.c:268
@deffn {Scheme Procedure} stack? obj
Return @code{#t} if @var{obj} is a calling stack.
@end deffn

make-stack
@c snarfed from stacks.c:277
@deffn {Scheme Procedure} make-stack obj . args
Create a new stack. If @var{obj} is @code{#t}, the current
evaluation stack is used for creating the stack frames,
otherwise the frames are taken from @var{obj} (which must be
a continuation or a frame object).

@var{args} should be a list containing any combination of
integer, procedure, address range, prompt tag and @code{#t}
values.

These values specify various ways of cutting away uninteresting
stack frames from the top and bottom of the stack that
@code{make-stack} returns.  They come in pairs like this:
@code{(@var{inner_cut_1} @var{outer_cut_1} @var{inner_cut_2}
@var{outer_cut_2} @dots{})}.

Each @var{inner_cut_i} can be an integer, a procedure, an
address range, or a prompt tag.  An integer means to cut away
exactly that number of frames.  A procedure means to cut
away all frames up to but excluding the frame whose procedure
matches the specified one.  An address range is a pair of
integers indicating the low and high addresses of a procedure's
code, and is the same as cutting away to a procedure (though
with less work).  Anything else is interpreted as a prompt tag
which cuts away all frames that are inside a prompt with the
given tag.

Each @var{outer_cut_i} can be an integer, a procedure, an
address range, or a prompt tag.  An integer means to cut away
that number of frames.  A procedure means to cut away frames
down to but excluding the frame whose procedure matches the
specified one.  An address range is the same, but with the
procedure's code specified as an address range.  Anything else
is taken to be a prompt tag, which cuts away all frames that are
outside a prompt with the given tag.

If the @var{outer_cut_i} of the last pair is missing, it is
taken as 0.
@end deffn

stack-id
@c snarfed from stacks.c:409
@deffn {Scheme Procedure} stack-id stack
Return the identifier given to @var{stack} by @code{start-stack}.
@end deffn

stack-ref
@c snarfed from stacks.c:437
@deffn {Scheme Procedure} stack-ref stack index
Return the @var{index}'th frame from @var{stack}.
@end deffn

stack-length
@c snarfed from stacks.c:454
@deffn {Scheme Procedure} stack-length stack
Return the length of @var{stack}.
@end deffn

get-internal-real-time
@c snarfed from stime.c:183
@deffn {Scheme Procedure} get-internal-real-time
Return the number of time units since the interpreter was
started.
@end deffn

times
@c snarfed from stime.c:194
@deffn {Scheme Procedure} times
Return an object with information about real and processor
time.  The following procedures accept such an object as an
argument and return a selected component:

@table @code
@item tms:clock
The current real time, expressed as time units relative to an
arbitrary base.
@item tms:utime
The CPU time units used by the calling process.
@item tms:stime
The CPU time units used by the system on behalf of the calling
process.
@item tms:cutime
The CPU time units used by terminated child processes of the
calling process, whose status has been collected (e.g., using
@code{waitpid}).
@item tms:cstime
Similarly, the CPU times units used by the system on behalf of
terminated child processes.
@end table
@end deffn

get-internal-run-time
@c snarfed from stime.c:251
@deffn {Scheme Procedure} get-internal-run-time
Return the number of time units of processor time used by the
interpreter.  Both @emph{system} and @emph{user} time are
included but subprocesses are not.
@end deffn

current-time
@c snarfed from stime.c:269
@deffn {Scheme Procedure} current-time
Return the number of seconds since 1970-01-01 00:00:00 UTC,
excluding leap seconds.
@end deffn

gettimeofday
@c snarfed from stime.c:284
@deffn {Scheme Procedure} gettimeofday
Return a pair containing the number of seconds and microseconds
since 1970-01-01 00:00:00 UTC, excluding leap seconds.  Note:
whether true microsecond resolution is available depends on the
operating system.
@end deffn

localtime
@c snarfed from stime.c:378
@deffn {Scheme Procedure} localtime time [zone]
Return an object representing the broken down components of
@var{time}, an integer like the one returned by
@code{current-time}.  The time zone for the calculation is
optionally specified by @var{zone} (a string), otherwise the
@code{TZ} environment variable or the system default is used.
@end deffn

gmtime
@c snarfed from stime.c:467
@deffn {Scheme Procedure} gmtime time
Return an object representing the broken down components of
@var{time}, an integer like the one returned by
@code{current-time}.  The values are calculated for UTC.
@end deffn

mktime
@c snarfed from stime.c:533
@deffn {Scheme Procedure} mktime sbd_time [zone]
@var{sbd_time} is an object representing broken down time and
@code{zone} is an optional time zone specifier (otherwise the
TZ environment variable or the system default is used).

Returns a pair: the car is a corresponding integer time value
like that returned by @code{current-time}; the cdr is a broken
down time object, similar to as @var{sbd_time} but with
normalized values.
@end deffn

tzset
@c snarfed from stime.c:622
@deffn {Scheme Procedure} tzset
Initialize the timezone from the TZ environment variable
or the system default.  It's not usually necessary to call this procedure
since it's done automatically by other procedures that depend on the
timezone.
@end deffn

strftime
@c snarfed from stime.c:636
@deffn {Scheme Procedure} strftime format stime
Return a string which is broken-down time structure @var{stime}
formatted according to the given @var{format} string.

@var{format} contains field specifications introduced by a
@samp{%} character.  See @ref{Formatting Calendar Time,,, libc,
The GNU C Library Reference Manual}, or @samp{man 3 strftime},
for the available formatting.

@lisp
(strftime "%c" (localtime (current-time)))
@result{} "Mon Mar 11 20:17:43 2002"
@end lisp

If @code{setlocale} has been called (@pxref{Locales}), month
and day names are from the current locale and in the locale
character set.
@end deffn

strptime
@c snarfed from stime.c:744
@deffn {Scheme Procedure} strptime format string
Performs the reverse action to @code{strftime}, parsing
@var{string} according to the specification supplied in
@var{format}.  The interpretation of month and day names is
dependent on the current locale.  The value returned is a pair.
The car has an object with time components
in the form returned by @code{localtime} or @code{gmtime},
but the time zone components
are not usefully set.
The cdr reports the number of characters from @var{string}
which were used for the conversion.
@end deffn

%string-dump
@c snarfed from strings.c:864
@deffn {Scheme Procedure} %string-dump str
Returns an association list containing debugging information
for @var{str}. The association list has the following entries.@table @code
@item string
The string itself.
@item start
The start index of the string into its stringbuf
@item length
The length of the string
@item shared
If this string is a substring, it returns its parent string.
Otherwise, it returns @code{#f}
@item read-only
@code{#t} if the string is read-only
@item stringbuf-chars
A new string containing this string's stringbuf's characters
@item stringbuf-length
The number of characters in this stringbuf
@item stringbuf-mutable
@code{#t} if this stringbuf is mutable
@item stringbuf-wide
@code{#t} if this stringbuf's characters are stored in a
32-bit buffer, or @code{#f} if they are stored in an 8-bit
buffer
@end table
@end deffn

%symbol-dump
@c snarfed from strings.c:963
@deffn {Scheme Procedure} %symbol-dump sym
Returns an association list containing debugging information
for @var{sym}. The association list has the following entries.@table @code
@item symbol
The symbol itself
@item hash
Its hash value
@item interned
@code{#t} if it is an interned symbol
@item stringbuf-chars
A new string containing this symbols's stringbuf's characters
@item stringbuf-length
The number of characters in this stringbuf
@item stringbuf-mutable
@code{#t} if this stringbuf is mutable
@item stringbuf-wide
@code{#t} if this stringbuf's characters are stored in a
32-bit buffer, or @code{#f} if they are stored in an 8-bit
buffer
@end table
@end deffn

string?
@c snarfed from strings.c:1054
@deffn {Scheme Procedure} string? obj
Return @code{#t} if @var{obj} is a string, else @code{#f}.
@end deffn

list->string
@c snarfed from strings.c:1064
@deffn {Scheme Procedure} list->string
implemented by the C function "scm_string"
@end deffn

string
@c snarfed from strings.c:1066
@deffn {Scheme Procedure} string . chrs
@deffnx {Scheme Procedure} list->string chrs
Return a newly allocated string composed of the arguments,
@var{chrs}.
@end deffn

make-string
@c snarfed from strings.c:1144
@deffn {Scheme Procedure} make-string k [chr]
Return a newly allocated string of
length @var{k}.  If @var{chr} is given, then all elements of
the string are initialized to @var{chr}, otherwise the contents
of the string are all set to @code{#
ul}.
@end deffn

string-length
@c snarfed from strings.c:1183
@deffn {Scheme Procedure} string-length string
Return the number of characters in @var{string}.
@end deffn

string-bytes-per-char
@c snarfed from strings.c:1193
@deffn {Scheme Procedure} string-bytes-per-char string
Return the bytes used to represent a character in @var{string}.This will return 1 or 4.
@end deffn

string-ref
@c snarfed from strings.c:1215
@deffn {Scheme Procedure} string-ref str k
Return character @var{k} of @var{str} using zero-origin
indexing. @var{k} must be a valid index of @var{str}.
@end deffn

string-set!
@c snarfed from strings.c:1251
@deffn {Scheme Procedure} string-set! str k chr
Store @var{chr} in element @var{k} of @var{str} and return
an unspecified value. @var{k} must be a valid index of
@var{str}.
@end deffn

substring
@c snarfed from strings.c:1288
@deffn {Scheme Procedure} substring str start [end]
Return a newly allocated string formed from the characters
of @var{str} beginning with index @var{start} (inclusive) and
ending with index @var{end} (exclusive).
@var{str} must be a string, @var{start} and @var{end} must be
exact integers satisfying:

0 <= @var{start} <= @var{end} <= (string-length @var{str}).
@end deffn

substring/read-only
@c snarfed from strings.c:1311
@deffn {Scheme Procedure} substring/read-only str start [end]
Return a newly allocated string formed from the characters
of @var{str} beginning with index @var{start} (inclusive) and
ending with index @var{end} (exclusive).
@var{str} must be a string, @var{start} and @var{end} must be
exact integers satisfying:

0 <= @var{start} <= @var{end} <= (string-length @var{str}).

The returned string is read-only.

@end deffn

substring/copy
@c snarfed from strings.c:1337
@deffn {Scheme Procedure} substring/copy str start [end]
Return a newly allocated string formed from the characters
of @var{str} beginning with index @var{start} (inclusive) and
ending with index @var{end} (exclusive).
@var{str} must be a string, @var{start} and @var{end} must be
exact integers satisfying:

0 <= @var{start} <= @var{end} <= (string-length @var{str}).
@end deffn

substring/shared
@c snarfed from strings.c:1361
@deffn {Scheme Procedure} substring/shared str start [end]
Return string that indirectly refers to the characters
of @var{str} beginning with index @var{start} (inclusive) and
ending with index @var{end} (exclusive).
@var{str} must be a string, @var{start} and @var{end} must be
exact integers satisfying:

0 <= @var{start} <= @var{end} <= (string-length @var{str}).
@end deffn

string-append
@c snarfed from strings.c:1384
@deffn {Scheme Procedure} string-append . args
Return a newly allocated string whose characters form the
concatenation of the given strings, @var{args}.
@end deffn

string-utf8-length
@c snarfed from strings.c:2051
@deffn {Scheme Procedure} string-utf8-length string
Returns the number of bytes in the UTF-8 representation of @var{string}.
@end deffn

string-normalize-nfc
@c snarfed from strings.c:2377
@deffn {Scheme Procedure} string-normalize-nfc string
Returns the NFC normalized form of @var{string}.
@end deffn

string-normalize-nfd
@c snarfed from strings.c:2387
@deffn {Scheme Procedure} string-normalize-nfd string
Returns the NFD normalized form of @var{string}.
@end deffn

string-normalize-nfkc
@c snarfed from strings.c:2397
@deffn {Scheme Procedure} string-normalize-nfkc string
Returns the NFKC normalized form of @var{string}.
@end deffn

string-normalize-nfkd
@c snarfed from strings.c:2407
@deffn {Scheme Procedure} string-normalize-nfkd string
Returns the NFKD normalized form of @var{string}.
@end deffn

string=?
@c snarfed from strorder.c:52
@deffn {Scheme Procedure} string=? [s1 [s2 . rest]]
Lexicographic equality predicate; return @code{#t} if the two
strings are the same length and contain the same characters in
the same positions, otherwise return @code{#f}.

The procedure @code{string-ci=?} treats upper and lower case
letters as though they were the same character, but
@code{string=?} treats upper and lower case as distinct
characters.
@end deffn

string-ci=?
@c snarfed from strorder.c:86
@deffn {Scheme Procedure} string-ci=? [s1 [s2 . rest]]
Case-insensitive string equality predicate; return @code{#t} if
the two strings are the same length and their component
characters match (ignoring case) at each position; otherwise
return @code{#f}.
@end deffn

string<?
@c snarfed from strorder.c:116
@deffn {Scheme Procedure} string<? [s1 [s2 . rest]]
Lexicographic ordering predicate; return @code{#t} if @var{s1}
is lexicographically less than @var{s2}.
@end deffn

string<=?
@c snarfed from strorder.c:144
@deffn {Scheme Procedure} string<=? [s1 [s2 . rest]]
Lexicographic ordering predicate; return @code{#t} if @var{s1}
is lexicographically less than or equal to @var{s2}.
@end deffn

string>?
@c snarfed from strorder.c:172
@deffn {Scheme Procedure} string>? [s1 [s2 . rest]]
Lexicographic ordering predicate; return @code{#t} if @var{s1}
is lexicographically greater than @var{s2}.
@end deffn

string>=?
@c snarfed from strorder.c:200
@deffn {Scheme Procedure} string>=? [s1 [s2 . rest]]
Lexicographic ordering predicate; return @code{#t} if @var{s1}
is lexicographically greater than or equal to @var{s2}.
@end deffn

string-ci<?
@c snarfed from strorder.c:228
@deffn {Scheme Procedure} string-ci<? [s1 [s2 . rest]]
Case insensitive lexicographic ordering predicate; return
@code{#t} if @var{s1} is lexicographically less than @var{s2}
regardless of case.
@end deffn

string-ci<=?
@c snarfed from strorder.c:257
@deffn {Scheme Procedure} string-ci<=? [s1 [s2 . rest]]
Case insensitive lexicographic ordering predicate; return
@code{#t} if @var{s1} is lexicographically less than or equal
to @var{s2} regardless of case.
@end deffn

string-ci>?
@c snarfed from strorder.c:286
@deffn {Scheme Procedure} string-ci>? [s1 [s2 . rest]]
Case insensitive lexicographic ordering predicate; return
@code{#t} if @var{s1} is lexicographically greater than
@var{s2} regardless of case.
@end deffn

string-ci>=?
@c snarfed from strorder.c:315
@deffn {Scheme Procedure} string-ci>=? [s1 [s2 . rest]]
Case insensitive lexicographic ordering predicate; return
@code{#t} if @var{s1} is lexicographically greater than or
equal to @var{s2} regardless of case.
@end deffn

object->string
@c snarfed from strports.c:234
@deffn {Scheme Procedure} object->string obj [printer]
Return a Scheme string obtained by printing @var{obj}.
Printing function can be specified by the optional second
argument @var{printer} (default: @code{write}).
@end deffn

open-input-string
@c snarfed from strports.c:289
@deffn {Scheme Procedure} open-input-string str
Take a string and return an input port that delivers characters
from the string. The port can be closed by
@code{close-input-port}, though its storage will be reclaimed
by the garbage collector if it becomes inaccessible.
@end deffn

open-output-string
@c snarfed from strports.c:301
@deffn {Scheme Procedure} open-output-string
Return an output port that will accumulate characters for
retrieval by @code{get-output-string}. The port can be closed
by the procedure @code{close-output-port}, though its storage
will be reclaimed by the garbage collector if it becomes
inaccessible.
@end deffn

get-output-string
@c snarfed from strports.c:314
@deffn {Scheme Procedure} get-output-string port
Given an output port created by @code{open-output-string},
return a string consisting of the characters that have been
output to the port so far.
@end deffn

eval-string
@c snarfed from strports.c:367
@deffn {Scheme Procedure} eval-string string [module]
Evaluate @var{string} as the text representation of a Scheme
form or forms, and return whatever value they produce.
Evaluation takes place in the given module, or the current
module when no module is given.
While the code is evaluated, the given module is made the
current one.  The current module is restored when this
procedure returns.
@end deffn

make-struct-layout
@c snarfed from struct.c:66
@deffn {Scheme Procedure} make-struct-layout fields
Return a new structure layout object.

@var{fields} must be a string made up of pairs of characters
strung together.  The first character of each pair describes a field
type, the second a field protection.  Allowed types are 'p' for
GC-protected Scheme data, 'u' for unprotected binary data.  
Allowed protections are 'w' for normal fields or 'h' for 
hidden fields.

Hidden fields are writable, but they will not consume an initializer arg
passed to @code{make-struct}. They are useful to add slots to a struct
in a way that preserves backward-compatibility with existing calls to
@code{make-struct}, especially for derived vtables.
@end deffn

struct?
@c snarfed from struct.c:289
@deffn {Scheme Procedure} struct? x
Return @code{#t} iff @var{x} is a structure object, else
@code{#f}.
@end deffn

struct-vtable?
@c snarfed from struct.c:299
@deffn {Scheme Procedure} struct-vtable? x
Return @code{#t} iff @var{x} is a vtable structure.
@end deffn

allocate-struct
@c snarfed from struct.c:394
@deffn {Scheme Procedure} allocate-struct vtable nfields
Allocate a new structure with space for @var{nfields} fields.

@var{vtable} must be a vtable structure (@pxref{Vtables}).

@var{nfields} must be a non-negative integer.  Strictly speaking
@var{nfields} is redundant, as the vtable carries the size
for its instances.  However passing it is useful as a sanity
check, given that one module can inline a constructor in
another.

Fields will be initialized with their default values.
@end deffn

make-struct/simple
@c snarfed from struct.c:421
@deffn {Scheme Procedure} make-struct/simple vtable . init
Create a new structure.

@var{vtable} must be a vtable structure (@pxref{Vtables}).

The @var{init1}, @dots{} arguments supply the initial values
for the structure's fields
.
This is a restricted variant of @code{make-struct/no-tail}
which applies only if the structure has no unboxed fields.
@code{make-struct/simple} must be called with as many
@var{init} values as the struct has fields.  No finalizer is set
on the instance, even if the vtable has a non-zero finalizer
field.  No magical vtable fields are inherited.

The advantage of using @code{make-struct/simple} is that the
compiler can inline it, so it is faster.  When in doubt though,
use @code{make-struct/no-tail}.
@end deffn

make-struct/no-tail
@c snarfed from struct.c:459
@deffn {Scheme Procedure} make-struct/no-tail vtable . init
Create a new structure.

@var{vtable} must be a vtable structure (@pxref{Vtables}).

The @var{init1}, @dots{} are optional arguments describing how
successive fields of the structure should be initialized.
Note that hidden fields (those with protection 'h') have to be
manually set.

If fewer optional arguments than initializable fields are supplied,
fields of type 'p' get default value #f while fields of type 'u' are
initialized to 0.
@end deffn

make-vtable
@c snarfed from struct.c:534
@deffn {Scheme Procedure} make-vtable fields [printer]
Create a vtable, for creating structures with the given
@var{fields}.

The optional @var{printer} argument is a function to be called
@code{(@var{printer} struct port)} on the structures created.
It should look at @var{struct} and write to @var{port}.
@end deffn

struct-ref
@c snarfed from struct.c:601
@deffn {Scheme Procedure} struct-ref handle pos
Access the @var{pos}th field of struct associated with
@var{handle}.

If the field is of type 'p', then it can be set to an arbitrary
value.

If the field is of type 'u', then it can only be set to a
non-negative integer value small enough to fit in one machine
word.
@end deffn

struct-set!
@c snarfed from struct.c:630
@deffn {Scheme Procedure} struct-set! handle pos val
Set the slot of the structure @var{handle} with index @var{pos}
to @var{val}.  Signal an error if the slot can not be written
to.
@end deffn

struct-ref/unboxed
@c snarfed from struct.c:655
@deffn {Scheme Procedure} struct-ref/unboxed handle pos
Access the @var{pos}th field of struct associated with
@var{handle}.  The field must be of type 'u'.
@end deffn

struct-set!/unboxed
@c snarfed from struct.c:677
@deffn {Scheme Procedure} struct-set!/unboxed handle pos val
Set the slot of the structure @var{handle} with index @var{pos}
to @var{val}.  Signal an error if the slot can not be written
to.
@end deffn

struct-vtable
@c snarfed from struct.c:702
@deffn {Scheme Procedure} struct-vtable handle
Return the vtable structure that describes the type of struct
associated with @var{handle}.
@end deffn

struct-vtable-name
@c snarfed from struct.c:729
@deffn {Scheme Procedure} struct-vtable-name vtable
Return the name of the vtable @var{vtable}.
@end deffn

set-struct-vtable-name!
@c snarfed from struct.c:739
@deffn {Scheme Procedure} set-struct-vtable-name! vtable name
Set the name of the vtable @var{vtable} to @var{name}.
@end deffn

symbol?
@c snarfed from symbols.c:269
@deffn {Scheme Procedure} symbol? obj
Return @code{#t} if @var{obj} is a symbol, otherwise return
@code{#f}.
@end deffn

symbol-interned?
@c snarfed from symbols.c:279
@deffn {Scheme Procedure} symbol-interned? symbol
Return @code{#t} if @var{symbol} is interned, otherwise return
@code{#f}.
@end deffn

make-symbol
@c snarfed from symbols.c:290
@deffn {Scheme Procedure} make-symbol name
Return a new uninterned symbol with the name @var{name}.  The returned symbol is guaranteed to be unique and future calls to @code{string->symbol} will not return it.
@end deffn

symbol->string
@c snarfed from symbols.c:302
@deffn {Scheme Procedure} symbol->string s
Return the name of @var{symbol} as a string.  The resulting
string is immutable.
@end deffn

string->symbol
@c snarfed from symbols.c:314
@deffn {Scheme Procedure} string->symbol string
Return the symbol whose name is @var{string}.
@end deffn

string-ci->symbol
@c snarfed from symbols.c:324
@deffn {Scheme Procedure} string-ci->symbol str
Return the symbol whose name is @var{str}.  @var{str} is
converted to lowercase before the conversion is done, if Guile
is currently reading symbols case-insensitively.
@end deffn

gensym
@c snarfed from symbols.c:342
@deffn {Scheme Procedure} gensym [prefix]
Create a new symbol with a name constructed from a prefix and
a counter value. The string @var{prefix} can be specified as
an optional argument. Default prefix is @code{ g}.  The counter
is increased by 1 at each call. There is no provision for
resetting the counter.
@end deffn

symbol-hash
@c snarfed from symbols.c:372
@deffn {Scheme Procedure} symbol-hash symbol
Return a hash value for @var{symbol}.
@end deffn

syntax?
@c snarfed from syntax.c:69
@deffn {Scheme Procedure} syntax? obj
Return @code{#t} if the argument @var{obj} is a syntax object,
else @code{#f}.
@end deffn

make-syntax
@c snarfed from syntax.c:100
@deffn {Scheme Procedure} make-syntax exp wrap module [source]
Make a new syntax object.
@end deffn

syntax-expression
@c snarfed from syntax.c:122
@deffn {Scheme Procedure} syntax-expression obj
Return the expression contained in the syntax object @var{obj}.
@end deffn

syntax-wrap
@c snarfed from syntax.c:132
@deffn {Scheme Procedure} syntax-wrap obj
Return the wrap contained in the syntax object @var{obj}.
@end deffn

syntax-module
@c snarfed from syntax.c:142
@deffn {Scheme Procedure} syntax-module obj
Return the module info contained in the syntax object @var{obj}.
@end deffn

syntax-source
@c snarfed from syntax.c:152
@deffn {Scheme Procedure} syntax-source obj
Return the source properties for syntax object @var{obj}, as
an alist possibly containing the keys @code{filename},
@code{line}, and @code{column}.  Return @code{#f} if no
source properties are available.
@end deffn

syntax-sourcev
@c snarfed from syntax.c:170
@deffn {Scheme Procedure} syntax-sourcev obj
Return the source location information for syntax object
@var{obj}, as a vector of @code{#(@var{filename} @var{line}
@var{column})}, or @code{#f} if no source properties are
available.
@end deffn

%call-with-new-thread
@c snarfed from threads.c:795
@deffn {Scheme Procedure} %call-with-new-thread thunk

@end deffn

yield
@c snarfed from threads.c:834
@deffn {Scheme Procedure} yield
Move the calling thread to the end of the scheduling queue.
@end deffn

thread?
@c snarfed from threads.c:873
@deffn {Scheme Procedure} thread? obj
Return @code{#t} if @var{obj} is a thread.
@end deffn

make-mutex
@c snarfed from threads.c:939
@deffn {Scheme Procedure} make-mutex [kind]
Create a new mutex.  If @var{kind} is not given, the mutex
will be a standard non-recursive mutex.  Otherwise pass
@code{recursive} to make a recursive mutex, or
@code{allow-external-unlock} to make a non-recursive mutex
that can be unlocked from any thread.
@end deffn

make-recursive-mutex
@c snarfed from threads.c:980
@deffn {Scheme Procedure} make-recursive-mutex
Create a new recursive mutex. 
@end deffn

lock-mutex
@c snarfed from threads.c:1061
@deffn {Scheme Procedure} lock-mutex mutex [timeout]
Lock mutex @var{mutex}. If the mutex is already locked, the calling thread blocks until the mutex becomes available.
@end deffn

unlock-mutex
@c snarfed from threads.c:1168
@deffn {Scheme Procedure} unlock-mutex mutex
Unlocks @var{mutex}.  The calling thread must already hold
the lock on @var{mutex}, unless the mutex was created with
the @code{allow-external-unlock} option; otherwise an error
will be signaled.
@end deffn

mutex?
@c snarfed from threads.c:1205
@deffn {Scheme Procedure} mutex? obj
Return @code{#t} if @var{obj} is a mutex.
@end deffn

mutex-owner
@c snarfed from threads.c:1214
@deffn {Scheme Procedure} mutex-owner mx
Return the thread owning @var{mx}, or @code{#f}.
@end deffn

mutex-level
@c snarfed from threads.c:1232
@deffn {Scheme Procedure} mutex-level mx
Return the lock level of mutex @var{mx}.
@end deffn

mutex-locked?
@c snarfed from threads.c:1247
@deffn {Scheme Procedure} mutex-locked? mx
Returns @code{#t} if the mutex @var{mx} is locked.
@end deffn

make-condition-variable
@c snarfed from threads.c:1281
@deffn {Scheme Procedure} make-condition-variable
Make a new condition variable.
@end deffn

wait-condition-variable
@c snarfed from threads.c:1392
@deffn {Scheme Procedure} wait-condition-variable cond mutex [timeout]
Wait until condition variable @var{cv} has been signaled.  While waiting, mutex @var{mx} is atomically unlocked (as with @code{unlock-mutex}) and is locked again when this function returns.  When @var{t} is given, it specifies a point in time where the waiting should be aborted.  It can be either a integer as returned by @code{current-time} or a pair as returned by @code{gettimeofday}.  When the waiting is aborted the mutex is locked and @code{#f} is returned.  After the condition variable is signaled, the mutex is locked and @code{#t} is returned.  @code{#t} may also be returned spuriously, so any relevant conditions should be re-checked.
@end deffn

signal-condition-variable
@c snarfed from threads.c:1447
@deffn {Scheme Procedure} signal-condition-variable cv
Wake up one thread that is waiting for @var{cv}
@end deffn

broadcast-condition-variable
@c snarfed from threads.c:1460
@deffn {Scheme Procedure} broadcast-condition-variable cv
Wake up all threads that are waiting for @var{cv}. 
@end deffn

condition-variable?
@c snarfed from threads.c:1474
@deffn {Scheme Procedure} condition-variable? obj
Return @code{#t} if @var{obj} is a condition variable.
@end deffn

current-thread
@c snarfed from threads.c:1661
@deffn {Scheme Procedure} current-thread
Return the thread that called this function.
@end deffn

all-threads
@c snarfed from threads.c:1679
@deffn {Scheme Procedure} all-threads
Return a list of all threads.
@end deffn

thread-exited?
@c snarfed from threads.c:1709
@deffn {Scheme Procedure} thread-exited? thread
Return @code{#t} iff @var{thread} has exited.

@end deffn

total-processor-count
@c snarfed from threads.c:1729
@deffn {Scheme Procedure} total-processor-count
Return the total number of processors of the machine, which
is guaranteed to be at least 1.  A ``processor'' here is a
thread execution unit, which can be either:

@itemize
@item an execution core in a (possibly multi-core) chip, in a
  (possibly multi- chip) module, in a single computer, or
@item a thread execution unit inside a core in the case of
  @dfn{hyper-threaded} CPUs.
@end itemize

Which of the two definitions is used, is unspecified.

@end deffn

current-processor-count
@c snarfed from threads.c:1747
@deffn {Scheme Procedure} current-processor-count
Like @code{total-processor-count}, but return the number of
processors available to the current process.  See
@code{setaffinity} and @code{getaffinity} for more
information.

@end deffn

char->formal-name
@c snarfed from unicode.c:44
@deffn {Scheme Procedure} char->formal-name ch
Return the formal all-upper-case unicode name of @var{ch},
as a string.  If the character has no name, return @code{#f}.
@end deffn

formal-name->char
@c snarfed from unicode.c:63
@deffn {Scheme Procedure} formal-name->char name
Return the character whose formal all-upper-case unicode name is
@var{name}, or @code{#f} if no such character is known.
@end deffn

values
@c snarfed from values.c:80
@deffn {Scheme Procedure} values . args
Delivers all of its arguments to its continuation.  Except for
continuations created by the @code{call-with-values} procedure,
all continuations take exactly one value.  The effect of
passing no value or more than one value to continuations that
were not created by @code{call-with-values} is unspecified.
@end deffn

make-variable
@c snarfed from variable.c:58
@deffn {Scheme Procedure} make-variable init
Return a variable initialized to value @var{init}.
@end deffn

make-undefined-variable
@c snarfed from variable.c:68
@deffn {Scheme Procedure} make-undefined-variable
Return a variable that is initially unbound.
@end deffn

variable?
@c snarfed from variable.c:78
@deffn {Scheme Procedure} variable? obj
Return @code{#t} iff @var{obj} is a variable object, else
return @code{#f}.
@end deffn

variable-ref
@c snarfed from variable.c:89
@deffn {Scheme Procedure} variable-ref var
Dereference @var{var} and return its value.
@var{var} must be a variable object; see @code{make-variable}
and @code{make-undefined-variable}.
@end deffn

variable-set!
@c snarfed from variable.c:105
@deffn {Scheme Procedure} variable-set! var val
Set the value of the variable @var{var} to @var{val}.
@var{var} must be a variable object, @var{val} can be any
value. Return an unspecified value.
@end deffn

variable-unset!
@c snarfed from variable.c:118
@deffn {Scheme Procedure} variable-unset! var
Ensure that @var{var} is not bound to a value.
@var{var} must be a variable object.
@end deffn

variable-bound?
@c snarfed from variable.c:130
@deffn {Scheme Procedure} variable-bound? var
Return @code{#t} iff @var{var} is bound to a value.
Throws an error if @var{var} is not a variable object.
@end deffn

vector?
@c snarfed from vectors.c:90
@deffn {Scheme Procedure} vector? obj
Return @code{#t} if @var{obj} is a vector, otherwise return
@code{#f}.
@end deffn

vector-length
@c snarfed from vectors.c:100
@deffn {Scheme Procedure} vector-length v
Returns the number of elements in @var{vector} as an exact integer.
@end deffn

list->vector
@c snarfed from vectors.c:119
@deffn {Scheme Procedure} list->vector
implemented by the C function "scm_vector"
@end deffn

vector
@c snarfed from vectors.c:128
@deffn {Scheme Procedure} vector . l
@deffnx {Scheme Procedure} list->vector l
Return a newly allocated vector composed of the
given arguments.  Analogous to @code{list}.

@lisp
(vector 'a 'b 'c) @result{} #(a b c)
@end lisp
@end deffn

vector-ref
@c snarfed from vectors.c:159
@deffn {Scheme Procedure} vector-ref vector k
@var{k} must be a valid index of @var{vector}.
@samp{Vector-ref} returns the contents of element @var{k} of
@var{vector}.

@lisp
(vector-ref '#(1 1 2 3 5 8 13 21) 5) @result{} 8
(vector-ref '#(1 1 2 3 5 8 13 21)
    (let ((i (round (* 2 (acos -1)))))
      (if (inexact? i)
        (inexact->exact i)
           i))) @result{} 13
@end lisp
@end deffn

vector-set!
@c snarfed from vectors.c:191
@deffn {Scheme Procedure} vector-set! vector k obj
@var{k} must be a valid index of @var{vector}.
@code{Vector-set!} stores @var{obj} in element @var{k} of @var{vector}.
The value returned by @samp{vector-set!} is unspecified.
@lisp
(let ((vec (vector 0 '(2 2 2 2) "Anna")))
  (vector-set! vec 1 '("Sue" "Sue"))
  vec) @result{}  #(0 ("Sue" "Sue") "Anna")
(vector-set! '#(0 1 2) 1 "doe") @result{} @emph{error} ; constant vector
@end lisp
@end deffn

make-vector
@c snarfed from vectors.c:222
@deffn {Scheme Procedure} make-vector k [fill]
Return a newly allocated vector of @var{k} elements.  If a
second argument is given, then each position is initialized to
@var{fill}.  Otherwise the initial contents of each position is
unspecified.
@end deffn

vector-copy
@c snarfed from vectors.c:262
@deffn {Scheme Procedure} vector-copy vec [start [end]]
Returns a freshly allocated vector containing the elements
of @var{vec} between @var{start} and @var{end}.

@var{start} defaults to 0 and @var{end} defaults to the
length of @var{vec}.
@end deffn

vector-copy!
@c snarfed from vectors.c:326
@deffn {Scheme Procedure} vector-copy! dst at src [start [end]]
Copy a block of elements from @var{src} to @var{dst}, both of which must be
vectors, starting in @var{dst} at @var{at} and starting in @var{src} at
@var{start} and ending at @var{end}.

It is an error for @var{dst} to have a length less than
@var{at} + (@var{end} - @var{start}). @var{at} and @var{start} default
to 0 and @var{end} defaults to the length of @var{src}.

If source and destination overlap, copying takes place as if the source
is first copied into a temporary vector and then into the destination.
@end deffn

vector->list
@c snarfed from vectors.c:368
@deffn {Scheme Procedure} vector->list vec
Return a newly allocated list composed of the elements of @var{vec}.

@lisp
(vector->list '#(dah dah didah)) @result{}  (dah dah didah)
(list->vector '(dididit dah)) @result{}  #(dididit dah)
@end lisp
@end deffn

vector-fill!
@c snarfed from vectors.c:412
@deffn {Scheme Procedure} vector-fill! vec fill [start [end]]
Assign the value of every location in vector @var{vec} in the range
[@var{start} ... @var{end}) to @var{fill}.  @var{start} defaults
to 0 and @var{end} defaults to the length of @var{vec}.  The value
returned by @code{vector-fill!} is unspecified.
@end deffn

vector-move-left!
@c snarfed from vectors.c:460
@deffn {Scheme Procedure} vector-move-left! vec1 start1 end1 vec2 start2
Copy elements from @var{vec1}, positions @var{start1} to @var{end1},
to @var{vec2} starting at position @var{start2}.  @var{start1} and
@var{start2} are inclusive indices; @var{end1} is exclusive.

@code{vector-move-left!} copies elements in leftmost order.
Therefore, in the case where @var{vec1} and @var{vec2} refer to the
same vector, @code{vector-move-left!} is usually appropriate when
@var{start1} is greater than @var{start2}.
@end deffn

vector-move-right!
@c snarfed from vectors.c:522
@deffn {Scheme Procedure} vector-move-right! vec1 start1 end1 vec2 start2
Copy elements from @var{vec1}, positions @var{start1} to @var{end1},
to @var{vec2} starting at position @var{start2}.  @var{start1} and
@var{start2} are inclusive indices; @var{end1} is exclusive.

@code{vector-move-right!} copies elements in rightmost order.
Therefore, in the case where @var{vec1} and @var{vec2} refer to the
same vector, @code{vector-move-right!} is usually appropriate when
@var{start1} is less than @var{start2}.
@end deffn

major-version
@c snarfed from version.c:42
@deffn {Scheme Procedure} major-version
Return a string containing Guile's major version number.
E.g., the 1 in "1.6.5".
@end deffn

minor-version
@c snarfed from version.c:55
@deffn {Scheme Procedure} minor-version
Return a string containing Guile's minor version number.
E.g., the 6 in "1.6.5".
@end deffn

micro-version
@c snarfed from version.c:68
@deffn {Scheme Procedure} micro-version
Return a string containing Guile's micro version number.
E.g., the 5 in "1.6.5".
@end deffn

version
@c snarfed from version.c:81
@deffn {Scheme Procedure} version
@deffnx {Scheme Procedure} major-version
@deffnx {Scheme Procedure} minor-version
@deffnx {Scheme Procedure} micro-version
Return a string describing Guile's version number, or its major, minor
or micro version number, respectively.

@lisp
(version) @result{} "1.6.0"
(major-version) @result{} "1"
(minor-version) @result{} "6"
(micro-version) @result{} "0"
@end lisp
@end deffn

effective-version
@c snarfed from version.c:102
@deffn {Scheme Procedure} effective-version
Return a string describing Guile's effective version number.
@lisp
(version) @result{} "1.6.0"
(effective-version) @result{} "1.6"
(major-version) @result{} "1"
(minor-version) @result{} "6"
(micro-version) @result{} "0"
@end lisp
@end deffn

make-weak-key-hash-table
@c snarfed from weak-table.c:737
@deffn {Scheme Procedure} make-weak-key-hash-table [n]
@deffnx {Scheme Procedure} make-weak-value-hash-table size
@deffnx {Scheme Procedure} make-doubly-weak-hash-table size
Return a weak hash table with @var{size} buckets.

You can modify weak hash tables in exactly the same way you
would modify regular hash tables. (@pxref{Hash Tables})
@end deffn

make-weak-value-hash-table
@c snarfed from weak-table.c:753
@deffn {Scheme Procedure} make-weak-value-hash-table [n]
Return a hash table with weak values with @var{size} buckets.
(@pxref{Hash Tables})
@end deffn

make-doubly-weak-hash-table
@c snarfed from weak-table.c:765
@deffn {Scheme Procedure} make-doubly-weak-hash-table [n]
Return a hash table with weak keys and values with @var{size}
buckets.  (@pxref{Hash Tables})
@end deffn

weak-key-hash-table?
@c snarfed from weak-table.c:777
@deffn {Scheme Procedure} weak-key-hash-table? obj
@deffnx {Scheme Procedure} weak-value-hash-table? obj
@deffnx {Scheme Procedure} doubly-weak-hash-table? obj
Return @code{#t} if @var{obj} is the specified weak hash
table. Note that a doubly weak hash table is neither a weak key
nor a weak value hash table.
@end deffn

weak-value-hash-table?
@c snarfed from weak-table.c:792
@deffn {Scheme Procedure} weak-value-hash-table? obj
Return @code{#t} if @var{obj} is a weak value hash table.
@end deffn

doubly-weak-hash-table?
@c snarfed from weak-table.c:803
@deffn {Scheme Procedure} doubly-weak-hash-table? obj
Return @code{#t} if @var{obj} is a doubly weak hash table.
@end deffn

make-weak-vector
@c snarfed from weak-vector.c:78
@deffn {Scheme Procedure} make-weak-vector size [fill]
Return a weak vector with @var{size} elements. If the optional
argument @var{fill} is given, all entries in the vector will be
set to @var{fill}. The default value for @var{fill} is the
empty list.
@end deffn

list->weak-vector
@c snarfed from weak-vector.c:91
@deffn {Scheme Procedure} list->weak-vector
implemented by the C function "scm_weak_vector"
@end deffn

weak-vector
@c snarfed from weak-vector.c:93
@deffn {Scheme Procedure} weak-vector . lst
@deffnx {Scheme Procedure} list->weak-vector lst
Construct a weak vector from a list: @code{weak-vector} uses
the list of its arguments while @code{list->weak-vector} uses
its only argument @var{l} (a list) to construct a weak vector
the same way @code{list->vector} would.
@end deffn

weak-vector?
@c snarfed from weak-vector.c:118
@deffn {Scheme Procedure} weak-vector? obj
Return @code{#t} if @var{obj} is a weak vector. Note that all
weak hashes are also weak vectors.
@end deffn

weak-vector-length
@c snarfed from weak-vector.c:142
@deffn {Scheme Procedure} weak-vector-length wvect
Like @code{vector-length}, but for weak vectors.
@end deffn

weak-vector-ref
@c snarfed from weak-vector.c:162
@deffn {Scheme Procedure} weak-vector-ref wvect k
Like @code{vector-ref}, but for weak vectors.
@end deffn

weak-vector-set!
@c snarfed from weak-vector.c:211
@deffn {Scheme Procedure} weak-vector-set! wvect k obj
Like @code{vector-set!}, but for weak vectors.
@end deffn

dlopen
@c snarfed from dynl.c:67
@deffn {Scheme Procedure} dlopen name flags

@end deffn

dlclose
@c snarfed from dynl.c:91
@deffn {Scheme Procedure} dlclose obj

@end deffn

dlsym
@c snarfed from dynl.c:105
@deffn {Scheme Procedure} dlsym obj name

@end deffn

pipe
@c snarfed from posix.c:233
@deffn {Scheme Procedure} pipe [flags]
Return a newly created pipe: a pair of ports which are linked
together on the local machine.  The @emph{car} is the input
port and the @emph{cdr} is the output port.  Data written (and
flushed) to the output port can be read from the input port.
Pipes are commonly used for communication with a newly forked
child process.  The need to flush the output port can be
avoided by making it unbuffered using @code{setvbuf}.

Optionally, on systems that support it such as GNU/Linux and
GNU/Hurd, @var{flags} can specify a bitwise-or of the following
constants:

@table @code
@item O_CLOEXEC
Mark the returned file descriptors as close-on-exec;
@item O_DIRECT
Create a pipe that performs input/output in "packet"
mode---see @command{man 2 pipe} for details;
@item O_NONBLOCK
Set the @code{O_NONBLOCK} status flag (non-blocking input and
output) on the file descriptors.
@end table

On systems that do @emph{not} support it, passing a non-zero
@var{flags} value triggers a @code{system-error} exception.

Writes occur atomically provided the size of the data in bytes
is not greater than the value of @code{PIPE_BUF}.  Note that
the output port is likely to block if too much data (typically
equal to @code{PIPE_BUF}) has been written but not yet read
from the input port.
@end deffn

getgroups
@c snarfed from posix.c:306
@deffn {Scheme Procedure} getgroups
Return a vector of integers representing the current
supplementary group IDs.
@end deffn

setgroups
@c snarfed from posix.c:338
@deffn {Scheme Procedure} setgroups group_vec
Set the current set of supplementary group IDs to the integers
in the given vector @var{group_vec}.  The return value is
unspecified.

Generally only the superuser can set the process group IDs.
@end deffn

getpw
@c snarfed from posix.c:389
@deffn {Scheme Procedure} getpw [user]
Look up an entry in the user database.  @var{user} can be an
integer, a string, or omitted, giving the behavior of
@code{getpwuid}, @code{getpwnam} or @code{getpwent}
respectively.
@end deffn

setpw
@c snarfed from posix.c:440
@deffn {Scheme Procedure} setpw [arg]
If called with a true argument, initialize or reset the password data
stream.  Otherwise, close the stream.  The @code{setpwent} and
@code{endpwent} procedures are implemented on top of this.
@end deffn

getgr
@c snarfed from posix.c:459
@deffn {Scheme Procedure} getgr [name]
Look up an entry in the group database.  @var{name} can be an
integer, a string, or omitted, giving the behavior of
@code{getgrgid}, @code{getgrnam} or @code{getgrent}
respectively.
@end deffn

setgr
@c snarfed from posix.c:496
@deffn {Scheme Procedure} setgr [arg]
If called with a true argument, initialize or reset the group data
stream.  Otherwise, close the stream.  The @code{setgrent} and
@code{endgrent} procedures are implemented on top of this.
@end deffn

getrlimit
@c snarfed from posix.c:633
@deffn {Scheme Procedure} getrlimit resource
Get a resource limit for this process. @var{resource} identifies the resource,
either as an integer or as a symbol. For example, @code{(getrlimit 'stack)}
gets the limits associated with @code{RLIMIT_STACK}.

@code{getrlimit} returns two values, the soft and the hard limit. If no
limit is set for the resource in question, the returned limit will be @code{#f}.
@end deffn

setrlimit
@c snarfed from posix.c:659
@deffn {Scheme Procedure} setrlimit resource soft hard
Set a resource limit for this process. @var{resource} identifies the resource,
either as an integer or as a symbol. @var{soft} and @var{hard} should be integers,
or @code{#f} to indicate no limit (i.e., @code{RLIM_INFINITY}).

For example, @code{(setrlimit 'stack 150000 300000)} sets the @code{RLIMIT_STACK}
limit to 150 kilobytes, with a hard limit of 300 kB.
@end deffn

kill
@c snarfed from posix.c:687
@deffn {Scheme Procedure} kill pid sig
Sends a signal to the specified process or group of processes.

@var{pid} specifies the processes to which the signal is sent:

@table @r
@item @var{pid} greater than 0
The process whose identifier is @var{pid}.
@item @var{pid} equal to 0
All processes in the current process group.
@item @var{pid} less than -1
The process group whose identifier is -@var{pid}
@item @var{pid} equal to -1
If the process is privileged, all processes except for some special
system processes.  Otherwise, all processes with the current effective
user ID.
@end table

@var{sig} should be specified using a variable corresponding to
the Unix symbolic name, e.g.,

@defvar SIGHUP
Hang-up signal.
@end defvar

@defvar SIGINT
Interrupt signal.
@end defvar
@end deffn

waitpid
@c snarfed from posix.c:722
@deffn {Scheme Procedure} waitpid pid [options]
This procedure collects status information from a child process which
has terminated or (optionally) stopped.  Normally it will
suspend the calling process until this can be done.  If more than one
child process is eligible then one will be chosen by the operating system.

The value of @var{pid} determines the behavior:

@table @r
@item @var{pid} greater than 0
Request status information from the specified child process.
@item @var{pid} equal to -1 or WAIT_ANY
Request status information for any child process.
@item @var{pid} equal to 0 or WAIT_MYPGRP
Request status information for any child process in the current process
group.
@item @var{pid} less than -1
Request status information for any child process whose process group ID
is -@var{pid}.
@end table

The @var{options} argument, if supplied, should be the bitwise OR of the
values of zero or more of the following variables:

@defvar WNOHANG
Return immediately even if there are no child processes to be collected.
@end defvar

@defvar WUNTRACED
Report status information for stopped processes as well as terminated
processes.
@end defvar

The return value is a pair containing:

@enumerate
@item
The process ID of the child process, or 0 if @code{WNOHANG} was
specified and no process was collected.
@item
The integer status value.
@end enumerate
@end deffn

status:exit-val
@c snarfed from posix.c:779
@deffn {Scheme Procedure} status:exit-val status
Return the exit status value, as would be set if a process
ended normally through a call to @code{exit} or @code{_exit},
if any, otherwise @code{#f}.
@end deffn

status:term-sig
@c snarfed from posix.c:800
@deffn {Scheme Procedure} status:term-sig status
Return the signal number which terminated the process, if any,
otherwise @code{#f}.
@end deffn

status:stop-sig
@c snarfed from posix.c:818
@deffn {Scheme Procedure} status:stop-sig status
Return the signal number which stopped the process, if any,
otherwise @code{#f}.
@end deffn

getppid
@c snarfed from posix.c:836
@deffn {Scheme Procedure} getppid
Return an integer representing the process ID of the parent
process.
@end deffn

getuid
@c snarfed from posix.c:848
@deffn {Scheme Procedure} getuid
Return an integer representing the current real user ID.
@end deffn

getgid
@c snarfed from posix.c:859
@deffn {Scheme Procedure} getgid
Return an integer representing the current real group ID.
@end deffn

geteuid
@c snarfed from posix.c:870
@deffn {Scheme Procedure} geteuid
Return an integer representing the current effective user ID.
If the system does not support effective IDs, then the real ID
is returned.  @code{(provided? 'EIDs)} reports whether the
system supports effective IDs.
@end deffn

getegid
@c snarfed from posix.c:888
@deffn {Scheme Procedure} getegid
Return an integer representing the current effective group ID.
If the system does not support effective IDs, then the real ID
is returned.  @code{(provided? 'EIDs)} reports whether the
system supports effective IDs.
@end deffn

setuid
@c snarfed from posix.c:906
@deffn {Scheme Procedure} setuid id
Sets both the real and effective user IDs to the integer @var{id}, provided
the process has appropriate privileges.
The return value is unspecified.
@end deffn

setgid
@c snarfed from posix.c:921
@deffn {Scheme Procedure} setgid id
Sets both the real and effective group IDs to the integer @var{id}, provided
the process has appropriate privileges.
The return value is unspecified.
@end deffn

seteuid
@c snarfed from posix.c:936
@deffn {Scheme Procedure} seteuid id
Sets the effective user ID to the integer @var{id}, provided the process
has appropriate privileges.  If effective IDs are not supported, the
real ID is set instead -- @code{(provided? 'EIDs)} reports whether the
system supports effective IDs.
The return value is unspecified.
@end deffn

setegid
@c snarfed from posix.c:960
@deffn {Scheme Procedure} setegid id
Sets the effective group ID to the integer @var{id}, provided the process
has appropriate privileges.  If effective IDs are not supported, the
real ID is set instead -- @code{(provided? 'EIDs)} reports whether the
system supports effective IDs.
The return value is unspecified.
@end deffn

getpgrp
@c snarfed from posix.c:985
@deffn {Scheme Procedure} getpgrp
Return an integer representing the current process group ID.
This is the POSIX definition, not BSD.
@end deffn

setpgid
@c snarfed from posix.c:999
@deffn {Scheme Procedure} setpgid pid pgid
Move the process @var{pid} into the process group @var{pgid}.  @var{pid} or
@var{pgid} must be integers: they can be zero to indicate the ID of the
current process.
Fails on systems that do not support job control.
The return value is unspecified.
@end deffn

setsid
@c snarfed from posix.c:1017
@deffn {Scheme Procedure} setsid
Creates a new session.  The current process becomes the session leader
and is put in a new process group.  The process will be detached
from its controlling terminal if it has one.
The return value is an integer representing the new process group ID.
@end deffn

getsid
@c snarfed from posix.c:1034
@deffn {Scheme Procedure} getsid pid
Returns the session ID of process @var{pid}.  (The session
ID of a process is the process group ID of its session leader.)
@end deffn

ttyname
@c snarfed from posix.c:1055
@deffn {Scheme Procedure} ttyname port
Return a string with the name of the serial terminal device
underlying @var{port}.
@end deffn

ctermid
@c snarfed from posix.c:1100
@deffn {Scheme Procedure} ctermid
Return a string containing the file name of the controlling
terminal for the current process.
@end deffn

tcgetpgrp
@c snarfed from posix.c:1116
@deffn {Scheme Procedure} tcgetpgrp port
Return the process group ID of the foreground process group
associated with the terminal open on the file descriptor
underlying @var{port}.

If there is no foreground process group, the return value is a
number greater than 1 that does not match the process group ID
of any existing process group.  This can happen if all of the
processes in the job that was formerly the foreground job have
terminated, and no other job has yet been moved into the
foreground.
@end deffn

tcsetpgrp
@c snarfed from posix.c:1145
@deffn {Scheme Procedure} tcsetpgrp port pgid
Set the foreground process group ID for the terminal used by the file
descriptor underlying @var{port} to the integer @var{pgid}.
The calling process
must be a member of the same session as @var{pgid} and must have the same
controlling terminal.  The return value is unspecified.
@end deffn

execl
@c snarfed from posix.c:1167
@deffn {Scheme Procedure} execl filename . args
Executes the file named by @var{filename} as a new process image.
The remaining arguments are supplied to the process; from a C program
they are accessible as the @code{argv} argument to @code{main}.
Conventionally the first @var{arg} is the same as @var{filename}.
All arguments must be strings.

If @var{arg} is missing, @var{path} is executed with a null
argument list, which may have system-dependent side-effects.

This procedure is currently implemented using the @code{execv} system
call, but we call it @code{execl} because of its Scheme calling interface.
@end deffn

execlp
@c snarfed from posix.c:1199
@deffn {Scheme Procedure} execlp filename . args
Similar to @code{execl}, however if
@var{filename} does not contain a slash
then the file to execute will be located by searching the
directories listed in the @code{PATH} environment variable.

This procedure is currently implemented using the @code{execvp} system
call, but we call it @code{execlp} because of its Scheme calling interface.
@end deffn

execle
@c snarfed from posix.c:1232
@deffn {Scheme Procedure} execle filename env . args
Similar to @code{execl}, but the environment of the new process is
specified by @var{env}, which must be a list of strings as returned by the
@code{environ} procedure.

This procedure is currently implemented using the @code{execve} system
call, but we call it @code{execle} because of its Scheme calling interface.
@end deffn

primitive-fork
@c snarfed from posix.c:1288
@deffn {Scheme Procedure} primitive-fork
Creates a new "child" process by duplicating the current "parent" process.
In the child the return value is 0.  In the parent the return value is
the integer process ID of the child.

This procedure has been renamed from @code{fork} to avoid a naming conflict
with the scsh fork.
@end deffn

spawn
@c snarfed from posix.c:1440
@deffn {Scheme Procedure} spawn program arguments . keyword_args
Spawn a new child process executing @var{program} with the
given @var{arguments}, a list of one or more strings (by
convention, the first argument is typically @var{program}),
and return its PID.  Raise a @code{system-error} exception if
@var{program} could not be found or could not be executed.

If the keyword argument @code{#:search-path?} is true, it
selects whether the @env{PATH} environment variable should be
inspected to find @var{program}.  It is true by default.

The @code{#:environment} keyword parameter specifies the
list of environment variables of the child process.  It
defaults to @code{(environ)}.

The keyword arguments @code{#:input}, @code{#:output}, and
@code{#:error} specify the port or file descriptor for the
child process to use as standard input, standard output, and
standard error.  No other file descriptors are inherited
from the parent process.

@end deffn

system*
@c snarfed from posix.c:1648
@deffn {Scheme Procedure} system* . args
Execute the command indicated by @var{args}.  The first element must
be a string indicating the command to be executed, and the remaining
items must be strings representing each of the arguments to that
command.

This function returns the exit status of the command as provided by
@code{waitpid}.  This value can be handled with @code{status:exit-val}
and the related functions.

@code{system*} is similar to @code{system}, but accepts only one
string per-argument, and performs no shell interpretation.  The
command is executed using fork and execlp.  Accordingly this function
may be safer than @code{system} in situations where shell
interpretation is not required.

Example: (system* "echo" "foo" "bar")
@end deffn

uname
@c snarfed from posix.c:1700
@deffn {Scheme Procedure} uname
Return an object with some information about the computer
system the program is running on.
@end deffn

environ
@c snarfed from posix.c:1724
@deffn {Scheme Procedure} environ [env]
If @var{env} is omitted, return the current environment (in the
Unix sense) as a list of strings.  Otherwise set the current
environment, which is also the default environment for child
processes, to the supplied list of strings.  Each member of
@var{env} should be of the form @code{NAME=VALUE} and values of
@code{NAME} should not be duplicated.  If @var{env} is supplied
then the return value is unspecified.
@end deffn

tmpnam
@c snarfed from posix.c:1772
@deffn {Scheme Procedure} tmpnam
Return a name in the file system that does not match any
existing file.  However there is no guarantee that another
process will not create the file after @code{tmpnam} is called.
Care should be taken if opening the file, e.g., use the
@code{O_EXCL} open flag or use @code{mkstemp} instead.
@end deffn

tmpfile
@c snarfed from posix.c:1799
@deffn {Scheme Procedure} tmpfile
Return an input/output port to a unique temporary file
named using the path prefix @code{P_tmpdir} defined in
@file{stdio.h}.
The file is automatically deleted when the port is closed
or the program terminates.
@end deffn

utime
@c snarfed from posix.c:1826
@deffn {Scheme Procedure} utime object [actime [modtime [actimens [modtimens [flags]]]]]
@code{utime} sets the access and modification times for the
file named by @var{object}.  If @var{actime} or @var{modtime} is
not supplied, then the current time is used.  @var{actime} and
@var{modtime} must be integer time values as returned by the
@code{current-time} procedure.

@var{object} must be a file name or a port (if supported by the system).

The optional @var{actimens} and @var{modtimens} are nanoseconds
to add @var{actime} and @var{modtime}. Nanosecond precision is
only supported on some combinations of file systems and operating
systems.
@lisp
(utime "foo" (- (current-time) 3600))
@end lisp
will set the access time to one hour in the past and the
modification time to the current time.

Last, @var{flags} may be either @code{0} or the
@code{AT_SYMLINK_NOFOLLOW} constant, to set the time of
@var{pathname} even if it is a symbolic link.

On GNU/Linux systems, at least when using the Linux kernel
5.10.46, if @var{object} is a port, it may not be a symbolic
link, even if @code{AT_SYMLINK_NOFOLLOW} is set.  This is either
a bug in Linux or Guile's wrappers.  The exact cause is unclear.
@end deffn

getpid
@c snarfed from posix.c:1945
@deffn {Scheme Procedure} getpid
Return an integer representing the current process ID.
@end deffn

putenv
@c snarfed from posix.c:1954
@deffn {Scheme Procedure} putenv str
Modifies the environment of the current process, which is also
the default environment inherited by child processes.  If
@var{str} is of the form @code{NAME=VALUE} then it will be
written directly into the environment, replacing any existing
environment string with name matching @code{NAME}.  If
@var{str} does not contain an equal sign, then any existing
string with name matching @var{str} will be removed.

The return value is unspecified.
@end deffn

setlocale
@c snarfed from posix.c:1987
@deffn {Scheme Procedure} setlocale category [locale]
If @var{locale} is omitted, return the current value of the
specified locale category as a system-dependent string.
@var{category} should be specified using the values
@code{LC_COLLATE}, @code{LC_ALL} etc.

Otherwise the specified locale category is set to the string
@var{locale} and the new value is returned as a
system-dependent string.  If @var{locale} is an empty string,
the locale will be set using environment variables.

When the locale is changed, the character encoding of the new
locale (UTF-8, ISO-8859-1, etc.) is used for the current
input, output, and error ports

@end deffn

mknod
@c snarfed from posix.c:2052
@deffn {Scheme Procedure} mknod path type perms dev
Creates a new special file, such as a file corresponding to a device.
@var{path} specifies the name of the file.  @var{type} should
be one of the following symbols:
regular, directory, symlink, block-special, char-special,
fifo, or socket.  @var{perms} (an integer) specifies the file permissions.
@var{dev} (an integer) specifies which device the special file refers
to.  Its exact interpretation depends on the kind of special file
being created.

E.g.,
@lisp
(mknod "/dev/fd0" 'block-special #o660 (+ (* 2 256) 2))
@end lisp

The return value is unspecified.
@end deffn

nice
@c snarfed from posix.c:2111
@deffn {Scheme Procedure} nice incr
Increment the priority of the current process by @var{incr}.  A higher
priority value means that the process runs less often.
The return value is unspecified.
@end deffn

sync
@c snarfed from posix.c:2131
@deffn {Scheme Procedure} sync
Flush the operating system disk buffers.
The return value is unspecified.
@end deffn

crypt
@c snarfed from posix.c:2162
@deffn {Scheme Procedure} crypt key salt
Encrypt @var{key} using @var{salt} as the salt value to the
crypt(3) library call.
@end deffn

chroot
@c snarfed from posix.c:2214
@deffn {Scheme Procedure} chroot path
Change the root directory to that specified in @var{path}.
This directory will be used for path names beginning with
@file{/}.  The root directory is inherited by all children
of the current process.  Only the superuser may change the
root directory.
@end deffn

getlogin
@c snarfed from posix.c:2234
@deffn {Scheme Procedure} getlogin
Return a string containing the name of the user logged in on
the controlling terminal of the process, or @code{#f} if this
information cannot be obtained.
@end deffn

getpriority
@c snarfed from posix.c:2251
@deffn {Scheme Procedure} getpriority which who
Return the scheduling priority of the process, process group
or user, as indicated by @var{which} and @var{who}. @var{which}
is one of the variables @code{PRIO_PROCESS}, @code{PRIO_PGRP}
or @code{PRIO_USER}, and @var{who} is interpreted relative to
@var{which} (a process identifier for @code{PRIO_PROCESS},
process group identifier for @code{PRIO_PGRP}, and a user
identifier for @code{PRIO_USER}.  A zero value of @var{who}
denotes the current process, process group, or user.  Return
the highest priority (lowest numerical value) of any of the
specified processes.
@end deffn

setpriority
@c snarfed from posix.c:2282
@deffn {Scheme Procedure} setpriority which who prio
Set the scheduling priority of the process, process group
or user, as indicated by @var{which} and @var{who}. @var{which}
is one of the variables @code{PRIO_PROCESS}, @code{PRIO_PGRP}
or @code{PRIO_USER}, and @var{who} is interpreted relative to
@var{which} (a process identifier for @code{PRIO_PROCESS},
process group identifier for @code{PRIO_PGRP}, and a user
identifier for @code{PRIO_USER}.  A zero value of @var{who}
denotes the current process, process group, or user.
@var{prio} is a value in the range -20 and 20, the default
priority is 0; lower priorities cause more favorable
scheduling.  Sets the priority of all of the specified
processes.  Only the super-user may lower priorities.
The return value is not specified.
@end deffn

getpass
@c snarfed from posix.c:2391
@deffn {Scheme Procedure} getpass prompt
Display @var{prompt} to the standard error output and read
a password from @file{/dev/tty}.  If this file is not
accessible, it reads from standard input.  The password may be
up to 127 characters in length.  Additional characters and the
terminating newline character are discarded.  While reading
the password, echoing and the generation of signals by special
characters is disabled.
@end deffn

flock
@c snarfed from posix.c:2419
@deffn {Scheme Procedure} flock file operation
Apply or remove an advisory lock on an open file.
@var{operation} specifies the action to be done:

@defvar LOCK_SH
Shared lock.  More than one process may hold a shared lock
for a given file at a given time.
@end defvar
@defvar LOCK_EX
Exclusive lock.  Only one process may hold an exclusive lock
for a given file at a given time.
@end defvar
@defvar LOCK_UN
Unlock the file.
@end defvar
@defvar LOCK_NB
Don't block when locking.  This is combined with one of the
other operations using @code{logior}.  If @code{flock} would
block an @code{EWOULDBLOCK} error is thrown.
@end defvar

The return value is not specified. @var{file} may be an open
file descriptor or an open file descriptor port.

Note that @code{flock} does not lock files across NFS.
@end deffn

sethostname
@c snarfed from posix.c:2464
@deffn {Scheme Procedure} sethostname name
Set the host name of the current processor to @var{name}. May
only be used by the superuser.  The return value is not
specified.
@end deffn

gethostname
@c snarfed from posix.c:2484
@deffn {Scheme Procedure} gethostname
Return the host name of the current processor.
@end deffn

gethost
@c snarfed from net_db.c:122
@deffn {Scheme Procedure} gethost [host]
@deffnx {Scheme Procedure} gethostbyname hostname
@deffnx {Scheme Procedure} gethostbyaddr address
Look up a host by name or address, returning a host object.  The
@code{gethost} procedure will accept either a string name or an integer
address; if given no arguments, it behaves like @code{gethostent} (see
below).  If a name or address is supplied but the address can not be
found, an error will be thrown to one of the keys:
@code{host-not-found}, @code{try-again}, @code{no-recovery} or
@code{no-data}, corresponding to the equivalent @code{h_error} values.
Unusual conditions may result in errors thrown to the
@code{system-error} or @code{misc_error} keys.
@end deffn

getnet
@c snarfed from net_db.c:210
@deffn {Scheme Procedure} getnet [net]
@deffnx {Scheme Procedure} getnetbyname net-name
@deffnx {Scheme Procedure} getnetbyaddr net-number
Look up a network by name or net number in the network database.  The
@var{net-name} argument must be a string, and the @var{net-number}
argument must be an integer.  @code{getnet} will accept either type of
argument, behaving like @code{getnetent} (see below) if no arguments are
given.
@end deffn

getproto
@c snarfed from net_db.c:263
@deffn {Scheme Procedure} getproto [protocol]
@deffnx {Scheme Procedure} getprotobyname name
@deffnx {Scheme Procedure} getprotobynumber number
Look up a network protocol by name or by number.  @code{getprotobyname}
takes a string argument, and @code{getprotobynumber} takes an integer
argument.  @code{getproto} will accept either type, behaving like
@code{getprotoent} (see below) if no arguments are supplied.
@end deffn

getserv
@c snarfed from net_db.c:326
@deffn {Scheme Procedure} getserv [name [protocol]]
@deffnx {Scheme Procedure} getservbyname name protocol
@deffnx {Scheme Procedure} getservbyport port protocol
Look up a network service by name or by service number, and return a
network service object.  The @var{protocol} argument specifies the name
of the desired protocol; if the protocol found in the network service
database does not match this name, a system error is signaled.

The @code{getserv} procedure will take either a service name or number
as its first argument; if given no arguments, it behaves like
@code{getservent} (see below).
@end deffn

sethost
@c snarfed from net_db.c:384
@deffn {Scheme Procedure} sethost [stayopen]
If @var{stayopen} is omitted, this is equivalent to @code{endhostent}.
Otherwise it is equivalent to @code{sethostent stayopen}.
@end deffn

setnet
@c snarfed from net_db.c:400
@deffn {Scheme Procedure} setnet [stayopen]
If @var{stayopen} is omitted, this is equivalent to @code{endnetent}.
Otherwise it is equivalent to @code{setnetent stayopen}.
@end deffn

setproto
@c snarfed from net_db.c:416
@deffn {Scheme Procedure} setproto [stayopen]
If @var{stayopen} is omitted, this is equivalent to @code{endprotoent}.
Otherwise it is equivalent to @code{setprotoent stayopen}.
@end deffn

setserv
@c snarfed from net_db.c:432
@deffn {Scheme Procedure} setserv [stayopen]
If @var{stayopen} is omitted, this is equivalent to @code{endservent}.
Otherwise it is equivalent to @code{setservent stayopen}.
@end deffn

getaddrinfo
@c snarfed from net_db.c:491
@deffn {Scheme Procedure} getaddrinfo name [service [hint_flags [hint_family [hint_socktype [hint_protocol]]]]]
Return a list of @code{addrinfo} structures containing a socket address and associated information for host @var{name} and/or @var{service} to be used in creating a socket with which to address the specified service.

@example
(let* ((ai (car (getaddrinfo "www.gnu.org" "http")))
       (s  (socket (addrinfo:fam ai) (addrinfo:socktype ai)
                   (addrinfo:protocol ai))))
  (connect s (addrinfo:addr ai))
  s)
@end example

When @var{service} is omitted or is @code{#f}, return network-level addresses for @var{name}.  When @var{name} is @code{#f} @var{service} must be provided and service locations local to the caller are returned.

Additional hints can be provided.  When specified, @var{hint_flags} should be a bitwise-or of zero or more constants among the following:

@table @code
@item AI_PASSIVE
Socket address is intended for @code{bind}.

@item AI_CANONNAME
Request for canonical host name, available via @code{addrinfo:canonname}.  This makes sense mainly when DNS lookups are involved.

@item AI_NUMERICHOST
Specifies that @var{name} is a numeric host address string (e.g., @code{"127.0.0.1"}), meaning that name resolution will not be used.

@item AI_NUMERICSERV
Likewise, specifies that @var{service} is a numeric port string (e.g., @code{"80"}).

@item AI_ADDRCONFIG
Return only addresses configured on the local system.  It is highly recommended to provide this flag when the returned socket addresses are to be used to make connections; otherwise, some of the returned addresses could be unreachable or use a protocol that is not supported.

@item AI_V4MAPPED
When looking up IPv6 addresses, return mapped IPv4 addresses if there is no IPv6 address available at all.

@item AI_ALL
If this flag is set along with @code{AI_V4MAPPED} when looking up IPv6 addresses, return all IPv6 addresses as well as all IPv4 addresses, the latter mapped to IPv6 format.
@end table

When given, @var{hint_family} should specify the requested address family, e.g., @code{AF_INET6}.  Similarly, @var{hint_socktype} should specify the requested socket type (e.g., @code{SOCK_DGRAM}), and @var{hint_protocol} should specify the requested protocol (its value is interpretered as in calls to @code{socket}).

On error, an exception with key @code{getaddrinfo-error} is thrown, with an error code (an integer) as its argument:

@example
(catch 'getaddrinfo-error
  (lambda ()
    (getaddrinfo "www.gnu.org" "gopher"))
  (lambda (key errcode)
    (cond ((= errcode EAI_SERVICE)
           (display "doesn't know about Gopher!\n"))
          ((= errcode EAI_NONAME)
           (display "www.gnu.org not found\n"))
          (else
           (format #t "something wrong: ~a\n"
                   (gai-strerror errcode))))))
@end example

Error codes are:

@table @code
@item EAI_AGAIN
The name or service could not be resolved at this time. Future attempts may succeed.

@item EAI_BADFLAGS
@var{hint_flags} contains an invalid value.

@item EAI_FAIL
A non-recoverable error occurred when attempting to resolve the name.

@item EAI_FAMILY
@var{hint_family} was not recognized.

@item EAI_NONAME
Either @var{name} does not resolve for the supplied parameters, or neither @var{name} nor @var{service} were supplied.

@item EAI_NODATA
This non-POSIX error code can be returned on some systems (GNU and Darwin, at least), for example when @var{name} is known but requests that were made turned out no data.  Error handling
code should be prepared to handle it when it is defined.

@item EAI_SERVICE
@var{service} was not recognized for the specified socket type.

@item EAI_SOCKTYPE
@var{hint_socktype} was not recognized.

@item EAI_SYSTEM
A system error occurred.  In C, the error code can be found in @code{errno}; this value is not accessible from Scheme, but in
practice it provides little information about the actual error cause.

@end table

Users are encouraged to read the @url{http://www.opengroup.org/onlinepubs/9699919799/functions/getaddrinfo.html,POSIX specification} for more details.

@end deffn

gai-strerror
@c snarfed from net_db.c:710
@deffn {Scheme Procedure} gai-strerror error
Return a string describing @var{error}, an integer error code returned by @code{getaddrinfo}.
@end deffn

inet-netof
@c snarfed from socket.c:107
@deffn {Scheme Procedure} inet-netof address
Return the network number part of the given IPv4
Internet address.  E.g.,

@lisp
(inet-netof 2130706433) @result{} 127
@end lisp
@end deffn

inet-lnaof
@c snarfed from socket.c:124
@deffn {Scheme Procedure} inet-lnaof address
Return the local-address-with-network part of the given
IPv4 Internet address, using the obsolete class A/B/C system.
E.g.,

@lisp
(inet-lnaof 2130706433) @result{} 1
@end lisp
@end deffn

inet-makeaddr
@c snarfed from socket.c:142
@deffn {Scheme Procedure} inet-makeaddr net lna
Make an IPv4 Internet address by combining the network number
@var{net} with the local-address-within-network number
@var{lna}.  E.g.,

@lisp
(inet-makeaddr 127 1) @result{} 2130706433
@end lisp
@end deffn

inet-ntop
@c snarfed from socket.c:287
@deffn {Scheme Procedure} inet-ntop family address
Convert a network address into a printable string.
Note that unlike the C version of this function,
the input is an integer with normal host byte ordering.
@var{family} can be @code{AF_INET} or @code{AF_INET6}.  E.g.,

@lisp
(inet-ntop AF_INET 2130706433) @result{} "127.0.0.1"
(inet-ntop AF_INET6 (- (expt 2 128) 1))
  @result{} "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"
@end lisp
@end deffn

inet-pton
@c snarfed from socket.c:341
@deffn {Scheme Procedure} inet-pton family address
Convert a string containing a printable network address to
an integer address.  Note that unlike the C version of this
function,
the result is an integer with normal host byte ordering.
@var{family} can be @code{AF_INET} or @code{AF_INET6}.  E.g.,

@lisp
(inet-pton AF_INET "127.0.0.1") @result{} 2130706433
(inet-pton AF_INET6 "::1") @result{} 1
@end lisp
@end deffn

socket
@c snarfed from socket.c:398
@deffn {Scheme Procedure} socket family style proto
Return a new socket port of the type specified by @var{family},
@var{style} and @var{proto}.  All three parameters are
integers.  Supported values for @var{family} are
@code{AF_UNIX}, @code{AF_INET} and @code{AF_INET6}.
Typical values for @var{style} are @code{SOCK_STREAM},
@code{SOCK_DGRAM} and @code{SOCK_RAW}.

@var{proto} can be obtained from a protocol name using
@code{getprotobyname}.  A value of zero specifies the default
protocol, which is usually right.

A single socket port cannot be used for communication until it
has been connected to another socket.
@end deffn

socketpair
@c snarfed from socket.c:425
@deffn {Scheme Procedure} socketpair family style proto
Return a pair of connected (but unnamed) socket ports of the
type specified by @var{family}, @var{style} and @var{proto}.
Many systems support only socket pairs of the @code{AF_UNIX}
family.  Zero is likely to be the only meaningful value for
@var{proto}.
@end deffn

getsockopt
@c snarfed from socket.c:459
@deffn {Scheme Procedure} getsockopt sock level optname
Return an option value from socket port @var{sock}.

@var{level} is an integer specifying a protocol layer, either
@code{SOL_SOCKET} for socket level options, or a protocol
number from the @code{IPPROTO} constants or @code{getprotoent}
(@pxref{Network Databases}).

@defvar SOL_SOCKET
@defvarx IPPROTO_IP
@defvarx IPPROTO_TCP
@defvarx IPPROTO_UDP
@end defvar

@var{optname} is an integer specifying an option within the
protocol layer.

For @code{SOL_SOCKET} level the following @var{optname}s are
defined (when provided by the system).  For their meaning see
@ref{Socket-Level Options,,, libc, The GNU C Library Reference
Manual}, or @command{man 7 socket}.

@defvar SO_DEBUG
@defvarx SO_REUSEADDR
@defvarx SO_STYLE
@defvarx SO_TYPE
@defvarx SO_ERROR
@defvarx SO_DONTROUTE
@defvarx SO_BROADCAST
@defvarx SO_SNDBUF
@defvarx SO_RCVBUF
@defvarx SO_KEEPALIVE
@defvarx SO_OOBINLINE
@defvarx SO_NO_CHECK
@defvarx SO_PRIORITY
@defvarx SO_REUSEPORT
The value returned is an integer.
@end defvar

@defvar SO_LINGER
The value returned is a pair of integers
@code{(@var{enable} . @var{timeout})}.  On old systems without
timeout support (ie.@: without @code{struct linger}), only
@var{enable} has an effect but the value in Guile is always a
pair.
@end defvar
@defvar SO_RCVTIMEO
@defvarx SO_SNDTIMEO
@var{value} is a pair of integers @code{(@var{SECONDS}
. @var{MICROSECONDS})}.
@end defvar
@end deffn

setsockopt
@c snarfed from socket.c:562
@deffn {Scheme Procedure} setsockopt sock level optname value
Set an option on socket port @var{sock}.  The return value is
unspecified.

@var{level} is an integer specifying a protocol layer, either
@code{SOL_SOCKET} for socket level options, or a protocol
number from the @code{IPPROTO} constants or @code{getprotoent}
(@pxref{Network Databases}).

@defvar SOL_SOCKET
@defvarx IPPROTO_IP
@defvarx IPPROTO_TCP
@defvarx IPPROTO_UDP
@end defvar

@var{optname} is an integer specifying an option within the
protocol layer.

For @code{SOL_SOCKET} level the following @var{optname}s are
defined (when provided by the system).  For their meaning see
@ref{Socket-Level Options,,, libc, The GNU C Library Reference
Manual}, or @command{man 7 socket}.

@defvar SO_DEBUG
@defvarx SO_REUSEADDR
@defvarx SO_STYLE
@defvarx SO_TYPE
@defvarx SO_ERROR
@defvarx SO_DONTROUTE
@defvarx SO_BROADCAST
@defvarx SO_SNDBUF
@defvarx SO_RCVBUF
@defvarx SO_KEEPALIVE
@defvarx SO_OOBINLINE
@defvarx SO_NO_CHECK
@defvarx SO_PRIORITY
@defvarx SO_REUSEPORT
@var{value} is an integer.
@end defvar

@defvar SO_LINGER
@var{value} is a pair of integers @code{(@var{ENABLE}
. @var{TIMEOUT})}.  On old systems without timeout support
(ie.@: without @code{struct linger}), only @var{ENABLE} has an
effect but the value in Guile is always a pair.
@end defvar

@defvar SO_RCVTIMEO
@defvarx SO_SNDTIMEO
@var{value} is a pair of integers @code{(@var{SECONDS}
. @var{MICROSECONDS})}.
@end defvar

@c  Note that we refer only to ``man ip'' here.  On GNU/Linux it's
@c  ``man 7 ip'' but on NetBSD it's ``man 4 ip''.
@c 
For IP level (@code{IPPROTO_IP}) the following @var{optname}s
are defined (when provided by the system).  See @command{man
ip} for what they mean.

@defvar IP_MULTICAST_IF
This sets the source interface used by multicast traffic.
@end defvar

@defvar IP_MULTICAST_TTL
This sets the default TTL for multicast traffic. This defaults 
to 1 and should be increased to allow traffic to pass beyond the
local network.
@end defvar

@defvar IP_ADD_MEMBERSHIP
@defvarx IP_DROP_MEMBERSHIP
These can be used only with @code{setsockopt}, not
@code{getsockopt}.  @var{value} is a pair
@code{(@var{MULTIADDR} . @var{INTERFACEADDR})} of IPv4
addresses (@pxref{Network Address Conversion}).
@var{MULTIADDR} is a multicast address to be added to or
dropped from the interface @var{INTERFACEADDR}.
@var{INTERFACEADDR} can be @code{INADDR_ANY} to have the system
select the interface.  @var{INTERFACEADDR} can also be an
interface index number, on systems supporting that.
@end defvar
@end deffn

shutdown
@c snarfed from socket.c:741
@deffn {Scheme Procedure} shutdown sock how
Sockets can be closed simply by using @code{close-port}. The
@code{shutdown} procedure allows reception or transmission on a
connection to be shut down individually, according to the parameter
@var{how}:

@table @asis
@item 0
Stop receiving data for this socket.  If further data arrives,  reject it.
@item 1
Stop trying to transmit data from this socket.  Discard any
data waiting to be sent.  Stop looking for acknowledgement of
data already sent; don't retransmit it if it is lost.
@item 2
Stop both reception and transmission.
@end table

The return value is unspecified.
@end deffn

connect
@c snarfed from socket.c:886
@deffn {Scheme Procedure} connect sock fam_or_sockaddr [address . args]
Initiate a connection from a socket using a specified address
family to the address
specified by @var{address} and possibly @var{args}.
The format required for @var{address}
and @var{args} depends on the family of the socket.

For a socket of family @code{AF_UNIX},
only @var{address} is specified and must be a string with the
filename where the socket is to be created.

For a socket of family @code{AF_INET},
@var{address} must be an integer IPv4 host address and
@var{args} must be a single integer port number.

For a socket of family @code{AF_INET6},
@var{address} must be an integer IPv6 host address and
@var{args} may be up to three integers:
port [flowinfo] [scope_id],
where flowinfo and scope_id default to zero.

Alternatively, the second argument can be a socket address object as returned by @code{make-socket-address}, in which case the no additional arguments should be passed.

Return true, unless the socket was configured to be non-blocking
and the operation has not finished yet.

@end deffn

bind
@c snarfed from socket.c:942
@deffn {Scheme Procedure} bind sock fam_or_sockaddr [address . args]
Assign an address to the socket port @var{sock}.
Generally this only needs to be done for server sockets,
so they know where to look for incoming connections.  A socket
without an address will be assigned one automatically when it
starts communicating.

The format of @var{address} and @var{args} depends
on the family of the socket.

For a socket of family @code{AF_UNIX}, only @var{address}
is specified and must be a string with the filename where
the socket is to be created.

For a socket of family @code{AF_INET}, @var{address}
must be an integer IPv4 address and @var{args}
must be a single integer port number.

The values of the following variables can also be used for
@var{address}:

@defvar INADDR_ANY
Allow connections from any address.
@end defvar

@defvar INADDR_LOOPBACK
The address of the local host using the loopback device.
@end defvar

@defvar INADDR_BROADCAST
The broadcast address on the local network.
@end defvar

@defvar INADDR_NONE
No address.
@end defvar

For a socket of family @code{AF_INET6}, @var{address}
must be an integer IPv6 address and @var{args}
may be up to three integers:
port [flowinfo] [scope_id],
where flowinfo and scope_id default to zero.

Alternatively, the second argument can be a socket address object as returned by @code{make-socket-address}, in which case the no additional arguments should be passed.

The return value is unspecified.
@end deffn

listen
@c snarfed from socket.c:1012
@deffn {Scheme Procedure} listen sock backlog
Enable @var{sock} to accept connection
requests.  @var{backlog} is an integer specifying
the maximum length of the queue for pending connections.
If the queue fills, new clients will fail to connect until
the server calls @code{accept} to accept a connection from
the queue.

The return value is unspecified.
@end deffn

make-socket-address
@c snarfed from socket.c:1290
@deffn {Scheme Procedure} make-socket-address family address . args
Return a Scheme address object that reflects @var{address}, being an address of family @var{family}, with the family-specific parameters @var{args} (see the description of @code{connect} for details).
@end deffn

accept
@c snarfed from socket.c:1315
@deffn {Scheme Procedure} accept sock [flags]
Accept a connection on a bound, listening socket.  If there
are no pending connections in the queue, there are two
possibilities: if the socket has been configured as
non-blocking, return @code{#f} directly.  Otherwise wait
until a connection is available.  When a connection comes,
the return value is a pair in which the @emph{car} is a new
socket port for the connection and the @emph{cdr} is an
object with address information about the client which
initiated the connection.

@var{sock} does not become part of the
connection and will continue to accept new requests.
@end deffn

getsockname
@c snarfed from socket.c:1364
@deffn {Scheme Procedure} getsockname sock
Return the address of @var{sock}, in the same form as the
object returned by @code{accept}.  On many systems the address
of a socket in the @code{AF_FILE} namespace cannot be read.
@end deffn

getpeername
@c snarfed from socket.c:1385
@deffn {Scheme Procedure} getpeername sock
Return the address that @var{sock}
is connected to, in the same form as the object returned by
@code{accept}.  On many systems the address of a socket in the
@code{AF_FILE} namespace cannot be read.
@end deffn

recv!
@c snarfed from socket.c:1407
@deffn {Scheme Procedure} recv! sock buf [flags]
Receive data from a socket port.
@var{sock} must already
be bound to the address from which data is to be received.
@var{buf} is a bytevector into which
the data will be written.  The size of @var{buf} limits
the amount of
data which can be received: in the case of packet
protocols, if a packet larger than this limit is encountered
then some data
will be irrevocably lost.

The optional @var{flags} argument is a value or
bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc.

The value returned is the number of bytes read from the
socket.

Note that the data is read directly from the socket file
descriptor:
any unread buffered port data is ignored.
@end deffn

send
@c snarfed from socket.c:1453
@deffn {Scheme Procedure} send sock message [flags]
Transmit bytevector @var{message} on socket port @var{sock}.
@var{sock} must already be bound to a destination address.  The
value returned is the number of bytes transmitted --
it's possible for
this to be less than the length of @var{message}
if the socket is
set to be non-blocking.  The optional @var{flags} argument
is a value or
bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc.

Note that the data is written directly to the socket
file descriptor:
any unflushed buffered port data is ignored.

This operation is defined only for strings containing codepoints
zero to 255.
@end deffn

recvfrom!
@c snarfed from socket.c:1498
@deffn {Scheme Procedure} recvfrom! sock buf [flags [start [end]]]
Receive data from socket port @var{sock} (which must be already
bound), returning the originating address as well as the data.
This is usually for use on datagram sockets, but can be used on
stream-oriented sockets too.

The data received is stored in bytevector @var{buf}, using
either the whole bytevector or just the region between the optional
@var{start} and @var{end} positions.  The size of @var{buf}
limits the amount of data that can be received.  For datagram
protocols, if a packet larger than this is received then excess
bytes are irrevocably lost.

The return value is a pair.  The @code{car} is the number of
bytes read.  The @code{cdr} is a socket address object which is
where the data came from, or @code{#f} if the origin is
unknown.

The optional @var{flags} argument is a or bitwise OR
(@code{logior}) of @code{MSG_OOB}, @code{MSG_PEEK},
@code{MSG_DONTROUTE} etc.

Data is read directly from the socket file descriptor, any
buffered port data is ignored.

On a GNU/Linux system @code{recvfrom!} is not multi-threading,
all threads stop while a @code{recvfrom!} call is in progress.
An application may need to use @code{select}, @code{O_NONBLOCK}
or @code{MSG_DONTWAIT} to avoid this.
@end deffn

sendto
@c snarfed from socket.c:1587
@deffn {Scheme Procedure} sendto sock message fam_or_sockaddr [address . args_and_flags]
Transmit bytevector @var{message} on socket port
@var{sock}.  The
destination address is specified using the @var{fam_or_sockaddr},
@var{address} and
@var{args_and_flags} arguments, or just a socket address object returned by @code{make-socket-address}, in a similar way to the
@code{connect} procedure.  @var{args_and_flags} contains
the usual connection arguments optionally followed by
a flags argument, which is a value or
bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc.

The value returned is the number of bytes transmitted --
it's possible for
this to be less than the length of @var{message} if the
socket is
set to be non-blocking.
Note that the data is written directly to the socket
file descriptor:
any unflushed buffered port data is ignored.
This operation is defined only for strings containing codepoints
zero to 255.
@end deffn

regexp?
@c snarfed from regex-posix.c:92
@deffn {Scheme Procedure} regexp? obj
Return @code{#t} if @var{obj} is a compiled regular expression,
or @code{#f} otherwise.
@end deffn

make-regexp
@c snarfed from regex-posix.c:102
@deffn {Scheme Procedure} make-regexp pat . flags
Compile the regular expression described by @var{pat}, and
return the compiled regexp structure.  If @var{pat} does not
describe a legal regular expression, @code{make-regexp} throws
a @code{regular-expression-syntax} error.

The @var{flags} arguments change the behavior of the compiled
regular expression.  The following flags may be supplied:

@table @code
@item regexp/icase
Consider uppercase and lowercase letters to be the same when
matching.
@item regexp/newline
If a newline appears in the target string, then permit the
@samp{^} and @samp{$} operators to match immediately after or
immediately before the newline, respectively.  Also, the
@samp{.} and @samp{[^...]} operators will never match a newline
character.  The intent of this flag is to treat the target
string as a buffer containing many lines of text, and the
regular expression as a pattern that may match a single one of
those lines.
@item regexp/basic
Compile a basic (``obsolete'') regexp instead of the extended
(``modern'') regexps that are the default.  Basic regexps do
not consider @samp{|}, @samp{+} or @samp{?} to be special
characters, and require the @samp{@{...@}} and @samp{(...)}
metacharacters to be backslash-escaped (@pxref{Backslash
Escapes}).  There are several other differences between basic
and extended regular expressions, but these are the most
significant.
@item regexp/extended
Compile an extended regular expression rather than a basic
regexp.  This is the default behavior; this flag will not
usually be needed.  If a call to @code{make-regexp} includes
both @code{regexp/basic} and @code{regexp/extended} flags, the
one which comes last will override the earlier one.
@end table
@end deffn

regexp-exec
@c snarfed from regex-posix.c:222
@deffn {Scheme Procedure} regexp-exec rx str [start [flags]]
Match the compiled regular expression @var{rx} against
@code{str}.  If the optional integer @var{start} argument is
provided, begin matching from that position in the string.
Return a match structure describing the results of the match,
or @code{#f} if no match could be found.

The @var{flags} arguments change the matching behavior.
The following flags may be supplied:

@table @code
@item regexp/notbol
Operator @samp{^} always fails (unless @code{regexp/newline}
is used).  Use this when the beginning of the string should
not be considered the beginning of a line.
@item regexp/noteol
Operator @samp{$} always fails (unless @code{regexp/newline}
is used).  Use this when the end of the string should not be
considered the end of a line.
@end table
@end deffn
