"Standard" extensions


1 - Output string port extensions.

(call-with-input-string string procedure) Calls the given procedure with one argument. This argument is an input string port which contains 'string'. 
Returns the result of the 'procedure' call.
(call-with-output-string procedure) Calls the given procedure with one argument. This argument is a newly created output string port. 
Returns the string the output port produces.
(get-output-string port) Returns the string that 'port', which must be a output string port, contains.
(open-input-string string) Returns a new output string port created from 'string'.
(open-output-string) Returns a new empty output port.
(output-string-port? object) Returns #t if  'object' is an output string port, #f otherwise.
(with-input-from-string string procedure) Calls the given procedure without arguments. In the body of this procedure (current-input-port) returns the string input port created from 'string'. 
Returns the result of the 'procedure' call.
(with-output-to-string procedure) Calls the given procedure without arguments. In the body of this procedure (current-output-port) returns a local string output port. 
Returns the string the output port produces.

2 - Bit manipulation.

In the scheme package integers are implemented using the Java type 'int'. You can use these low-level functions to operate on bits.
 
(bit-and n1 n2) Returns n1 & n2
(bit-lsh n1 n2)  Returns n1 << n2
(bit-not n) Returns ~n1
(bit-or n1 n2) Returns n1 | n2
(bit-rsh n1 n2) Returns n1 >> n2
(bit-xor n1 n2) Returns n1 ^ n2

3 - Miscellaneous extensions.

(assert string object ...) Creates an error if the debug mode is on (see debug-on and debug-off) and one of the given objects evaluates to #f. 'string' must be the name of the current function. If debug mode is off the arguments are not evaluated. 
Returns an undefined value.
(autoload symbol string) Creates an autoloadable procedure bounded to 'symbol' in the top-level environment. This procedure, when first invoked, causes the loading of the file named 'string'. 
Returns an undefined value.
(bound? symbol) Returns #t if  'symbol' is bound to a value in the current environment, #f otherwise.
(debug-off) Turns off the debug mode (see assert). 
Returns an undefined value.
(debug-on) Turns on the debug mode (see assert). 
Returns an undefined value.
(eval object) Returns the result of the evaluation of  'object' in the top-level environment.
(exit) Kills the Java Virtual Machine. 
Never returns.
(file-exists? string) Returns #t if the file named 'string' exists, #f otherwise.
(local-eval object) Returns the result of the evaluation of  'object' in the current environment.
(promise? object) Returns #t if  'object' is a promise expression (created with delay), #f otherwise.
(random) Returns an uniformly distributed random integer value.
(time object) Prints the time elapsed while evaluation of the given expression. This procedure is a built-in macro: 'object' must not be quoted. 
Returns the result of the evaluation of the expression.

 Stéphane Hillion - 1998