Pseudo-random numbers are generated from a random state object, which
can be created with @code{seed->random-state} or
-@code{external->random-state}. An external representation (i.e. one
+@code{datum->random-state}. An external representation (i.e. one
which can written with @code{write} and read with @code{read}) of a
random state object can be obtained via
-@code{random-state->external}. The @var{state} parameter to the
+@code{random-state->datum}. The @var{state} parameter to the
various functions below is optional, it defaults to the state object
in the @code{*random-state*} variable.
Return a new random state using @var{seed}.
@end deffn
-@deffn {Scheme Procedure} external->random-state external
-@deffnx {C Function} scm_external_to_random_state (external)
-Return a new random state from the external representation
-@var{external}, which must have been obtained by
-@code{random-state->external}.
+@deffn {Scheme Procedure} datum->random-state datum
+@deffnx {C Function} scm_datum_to_random_state (datum)
+Return a new random state from @var{datum}, which should have been
+obtained by @code{random-state->datum}.
@end deffn
-@deffn {Scheme Procedure} random-state->external state
-@deffnx {C Function} scm_random_state_to_external (state)
-Return an external representation of @var{state}. You cannot make
-any assumtions on the structure of the returned object besides that
-it will be an acceptable argument to @code{external->random-state}
-and that it will be able to be written and read back by the Scheme
-reader.
+@deffn {Scheme Procedure} random-state->datum state
+@deffnx {C Function} scm_random_state_to_datum (state)
+Return a datum representation of @var{state} that may be written out and
+read back with the Scheme reader.
@end deffn
@defvar *random-state*
SCM_DEFINE (scm_datum_to_random_state, "datum->random-state", 1, 0, 0,
(SCM datum),
- "Return a new random state using @var{datum}.\n"
- "\n"
- "@var{datum} must be an external state representation obtained\n"
- "from @code{random-state->datum}.")
+ "Return a new random state using @var{datum}, which should have\n"
+ "been obtailed from @code{random-state->datum}.")
#define FUNC_NAME s_scm_datum_to_random_state
{
return make_rstate (scm_c_rstate_from_datum (datum));