Next: amb api generator, Previous: amb api core, Up: amb api [Index]
The following bindings are exported by the library (vicare
language-extensions amb)
.
Like amb
but permute the order of the given expressions. The
permutation determining the selection order is generated at every first
execution of the expanded code, using the random fixnum generator
referenced by amb-random-fixnum-maker
.
If we define the following function:
(define (choose) (amb 1 2 3))
a new permutation is generated at every function invocation.
Like amb
but randomly select an expression to evaluate; the same
expression can be selected multiple times. This syntax never finishes
choices. The next expression to evaluate is selected using the random
fixnum generator referenced by amb-random-fixnum-maker
.
Hold a procedure accepting a fixnum as single argument: when applied to
the fixnum N it must return a fixnum in the range [0, N).
It is initialised with random
from the library (vicare)
,
(vicare-scheme)random.