Standard Libraries

This section lists the exports provided by the standard libraries. The libraries are factored so as to separate features which might not be supported by all implementations, or which might be expensive to load.

The scheme library prefix is used for all standard libraries, and is reserved for use by future standards.

Base Library

The (scheme base) library exports many of the procedures and syntax bindings that are traditionally associated with Scheme. The division between the base library and the other standard libraries is based on use, not on construction. In particular, some facilities that are typically implemented as primitives by a compiler or the run-time system rather than in terms of other standard procedures or syntax are not part of the base library, but are defined in separate libraries. By the same token, some exports of the base library are implementable in terms of other exports. They are redundant in the strict sense of the word, but they capture common patterns of usage, and are therefore provided as convenient abbreviations.

Case-Lambda Library

The (scheme case-lambda) library exports the case-lambda syntax.

Char Library

The (scheme char) library provides the procedures for dealing with characters that involve potentially large tables when supporting all of Unicode.

Complex Library

The (scheme complex) library exports procedures which are typically only useful with non-real numbers.

CxR Library

The (scheme cxr) library exports twenty-four procedures which are the compositions of from three to four car and cdr operations. For example caddar could be defined by

(define caddar (lambda (x) (car (cdr (cdr (car x))))))

The procedures car and cdr themselves and the four two-level compositions are included in the base library. See section 6.4.

Eval Library

The (scheme eval) library exports procedures for evaluating Scheme data as programs.

File Library

The (scheme file) library provides procedures for accessing files.

Inexact Library

The (scheme inexact) library exports procedures which are typically only useful with inexact values.

Lazy Library

The (scheme lazy) library exports procedures and syntax keywords for lazy evaluation.

Load Library

The (scheme load) library exports procedures for loading Scheme expressions from files.

Process-Context Library

The (scheme process-context) library exports procedures for accessing with the program's calling context.

Read Library

The (scheme read) library provides procedures for reading Scheme objects.

Repl Library

The (scheme repl) library exports the interaction-environment procedure.

Time Library

The (scheme time) library provides access to time-related values.

Write Library

The (scheme write) library provides procedures for writing Scheme objects.

husk-scheme online documentation rev 3.19.3 (2016.07.10)