2 SICP Language
#lang sicp | package: sicp |
2.1 Introduction
The programs in the book are written in (a subset of) the programming language Scheme. As the years have passed the programming language Scheme has evolved. The language #lang sicp provides you with a version of R5RS (the fifth revision of Scheme) changed slightly in order for programs in SICP to run as is.
To use the sicp language simply use #lang sicp as the first line of your program. If you need to use Racket libraries, then use #%require. R5RS has no require to avoid breaking programs that use the name require. #%require is therefore used instead.
2.2 Built-In
value
the-empty-stream : stream?
syntax
(cons-stream first-expr rest-expr)
procedure
(stream-null? s) → boolean?
s : stream?
procedure
syntax
(amb expr ...)
Additionally, true, false, identity, and error are provided from Racket.