# migrations

dir: embeddings_queue
filename: 00001-embeddings.sqlite.sql
hash: d3755dfd232be8e8301f4d7fcfb3a486
sql:
CREATE TABLE embeddings_queue (
    seq_id INTEGER PRIMARY KEY,
    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    operation INTEGER NOT NULL,
    topic TEXT NOT NULL,
    id TEXT NOT NULL,
    vector BLOB,
    encoding TEXT,
    metadata TEXT
);


dir: sysdb
filename: 00001-collections.sqlite.sql
hash: 38352d725ad1c16074fac420b22b4633
sql:
CREATE TABLE collections (
    id TEXT PRIMARY KEY,
    name TEXT NOT NULL,
    topic TEXT NOT NULL,
    UNIQUE (name)
);

CREATE TABLE collection_metadata (
    collection_id TEXT REFERENCES collections(id) ON DELETE CASCADE,
    key TEXT NOT NULL,
    str_value TEXT,
    int_value INTEGER,
    float_value REAL,
    PRIMARY KEY (collection_id, key)
);


dir: sysdb
filename: 00002-segments.sqlite.sql
hash: 2913cb6a503055a95f625448037e8912
sql:
CREATE TABLE segments (
    id TEXT PRIMARY KEY,
    type TEXT NOT NULL,
    scope TEXT NOT NULL,
    topic TEXT,
    collection TEXT REFERENCES collection(id)
);

CREATE TABLE segment_metadata (
    segment_id TEXT  REFERENCES segments(id) ON DELETE CASCADE,
    key TEXT NOT NULL,
    str_value TEXT,
    int_value INTEGER,
    float_value REAL,
    PRIMARY KEY (segment_id, key)
);


dir: sysdb
filename: 00004-tenants-databases.sqlite.sql
hash: 048867ce8fcdefe4023c7110e4433591
sql:
CREATE TABLE IF NOT EXISTS tenants (
    id TEXT PRIMARY KEY,
    UNIQUE (id)
);

CREATE TABLE IF NOT EXISTS databases (
    id TEXT PRIMARY KEY, -- unique globally
    name TEXT NOT NULL, -- unique per tenant
    tenant_id TEXT NOT NULL REFERENCES tenants(id) ON DELETE CASCADE,
    UNIQUE (tenant_id, name) -- Ensure that a tenant has only one database with a given name
);

CREATE TABLE IF NOT EXISTS collections_tmp (
    id TEXT PRIMARY KEY, -- unique globally
    name TEXT NOT NULL, -- unique per database
    topic TEXT NOT NULL,
    dimension INTEGER,
    database_id TEXT NOT NULL REFERENCES databases(id) ON DELETE CASCADE,
    UNIQUE (name, database_id)
);

-- Create default tenant and database
INSERT OR REPLACE INTO tenants (id) VALUES ('default_tenant'); -- The default tenant id is 'default_tenant' others are UUIDs
INSERT OR REPLACE INTO databases (id, name, tenant_id) VALUES ('00000000-0000-0000-0000-000000000000', 'default_database', 'default_tenant');

INSERT OR REPLACE INTO collections_tmp (id, name, topic, dimension, database_id)
    SELECT id, name, topic, dimension, '00000000-0000-0000-0000-000000000000' FROM collections;
DROP TABLE collections;
ALTER TABLE collections_tmp RENAME TO collections;


dir: metadb
filename: 00001-embedding-metadata.sqlite.sql
hash: 2b4cf52c4bb2676e21d6860a4409f856
sql:
CREATE TABLE embeddings (
    id INTEGER PRIMARY KEY,
    segment_id TEXT NOT NULL,
    embedding_id TEXT NOT NULL,
    seq_id BLOB NOT NULL,
    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UNIQUE (segment_id, embedding_id)
);

CREATE TABLE embedding_metadata (
    id INTEGER REFERENCES embeddings(id),
    key TEXT NOT NULL,
    string_value TEXT,
    int_value INTEGER,
    float_value REAL,
    PRIMARY KEY (id, key)
);

CREATE TABLE max_seq_id (
    segment_id TEXT PRIMARY KEY,
    seq_id BLOB NOT NULL
);

CREATE VIRTUAL TABLE embedding_fulltext USING fts5(id, string_value);


dir: metadb
filename: 00002-embedding-metadata.sqlite.sql
hash: 12a570f7121b3a8ce750a2a7c36da20f
sql:
-- SQLite does not support adding check with alter table, as a result, adding a check
-- involve creating a new table and copying the data over. It is over kill with adding
-- a boolean type column. The application write to the table needs to ensure the data
-- integrity.
ALTER TABLE embedding_metadata ADD COLUMN bool_value INTEGER


dir: metadb
filename: 00003-full-text-tokenize.sqlite.sql
hash: f97ad6334aeaa8f419f01110b648b97a
sql:
CREATE VIRTUAL TABLE embedding_fulltext_search USING fts5(string_value, tokenize='trigram');
INSERT INTO embedding_fulltext_search (rowid, string_value) SELECT rowid, string_value FROM embedding_metadata;
DROP TABLE embedding_fulltext;


# embeddings_queue

created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 0
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "Revised5Report on the Algorithmic Language Scheme RICHARD KELSEY , WILLIAM CLINGER, AND JONATHAN REES(Editors ) H. A BELSON R. K. D YBVIG C. T. H AYNES G. J. R OZAS N. I. A DAMS IV D. P. F RIEDMAN E. K OHLBECKER G. L. S TEELE JR. D. H. B ARTLEY R. H ALSTEAD D. O XLEY G. J. S USSMAN G. B ROOKS C. H ANSON K. M. P ITMAN M. W AND Dedicated to the Memory of Robert Hieb 20 February 1998 SUMMARY The report gives a de\ufb01ning description of the program- ming language Scheme. Scheme is a statically scoped and properly "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 512
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "tail-recursive dialect of the Lisp programming language invented by Guy Lewis Steele Jr. and Gerald Jay Sussman. It was designed to have an exceptionally clear and simple semantics and few di\ufb00erent ways to form expressions. A wide variety of programming paradigms, in- cluding imperative, functional, and message passing styles, \ufb01nd convenient expression in Scheme. The introduction o\ufb00ers a brief history of the language and of the report. The \ufb01rst three chapters present the fundamental ideas of the language an"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 1024
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "d describe the notational conventions used for describing the language and for writing programs in the language. Chapters 4and5describe the syntax and semantics of expressions, programs, and de\ufb01nitions. Chapter 6describes Scheme\u2019s built-in procedures, which include all of the language\u2019s data manipulation and in- put/output primitives. Chapter 7provides a formal syntax for Scheme written in extended BNF, along with a formal denotational semantics. An example of the use of the language follows the formal synt"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 1536
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ax and semantics. The report concludes with a list of references and an al- phabetic index.CONTENTS Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1 Overview of Scheme . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 Semantics . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Notation and terminology . . . . . . . . . . . . . . . . 3 2 Lexical conventions . . . . . . . . . . . . . . . . . . . . . . . 5 2.1 Id"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 2048
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "enti\ufb01ers . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 Whitespace and comments . . . . . . . . . . . . . . . . 5 2.3 Other notations . . . . . . . . . . . . . . . . . . . . . . 5 3 Basic concepts . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.1 Variables, syntactic keywords, and regions . . . . . . . 6 3.2 Disjointness of types . . . . . . . . . . . . . . . . . . . 6 3.3 External representations . . . . . . . . . . . . . . . . . 6 3.4 Storage model . . . . . . . . . . . . . . . . . . . . "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 2560
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": ". . . 7 3.5 Proper tail recursion . . . . . . . . . . . . . . . . . . . 7 4 Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4.1 Primitive expression types . . . . . . . . . . . . . . . . 8 4.2 Derived expression types . . . . . . . . . . . . . . . . . 10 4.3 Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5 Program structure . . . . . . . . . . . . . . . . . . . . . . . . 16 5.1 Programs . . . . . . . . . . . . . . . . . . . . . . . . . 16 5.2 De\ufb01nitions . . . . . . . . ."}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 3072
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " . . . . . . . . . . . . . . . . 16 5.3 Syntax de\ufb01nitions . . . . . . . . . . . . . . . . . . . . 17 6 Standard procedures . . . . . . . . . . . . . . . . . . . . . . 17 6.1 Equivalence predicates . . . . . . . . . . . . . . . . . . 17 6.2 Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . 19 6.3 Other data types . . . . . . . . . . . . . . . . . . . . . 25 6.4 Control features . . . . . . . . . . . . . . . . . . . . . . 31 6.5Eval . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 6.6 Inpu"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 3584
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "t and output . . . . . . . . . . . . . . . . . . . . . 35 7 Formal syntax and semantics . . . . . . . . . . . . . . . . . . 38 7.1 Formal syntax . . . . . . . . . . . . . . . . . . . . . . . 38 7.2 Formal semantics . . . . . . . . . . . . . . . . . . . . . 40 7.3 Derived expression types . . . . . . . . . . . . . . . . . 43 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Additional material . . . . . . . . . . . . . . . . . . . . . . . . 45 Example . . . . . . . . . . . . . . . . . "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 4096
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": ". . . . . . . . . . . . . . 45 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Alphabetic index of de\ufb01nitions of concepts, keywords, and procedures . . . . . . . . . . . . . . . . 482 Revised5Scheme INTRODUCTION Programming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional features appear nec- essary. Scheme demonstrates that a very small number of rules for forming expressions, with no restric"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 4608
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "tions on how they are composed, su\ufb03ce to form a practical and e\ufb03cient programming language that is \ufb02exible enough to support most of the major programming paradigms in use today. Scheme was one of the \ufb01rst programming languages to in- corporate \ufb01rst class procedures as in the lambda calculus, thereby proving the usefulness of static scope rules and block structure in a dynamically typed language. Scheme was the \ufb01rst major dialect of Lisp to distinguish procedures from lambda expressions and symbols, to use "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 5120
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "a single lex- ical environment for all variables, and to evaluate the op- erator position of a procedure call in the same way as an operand position. By relying entirely on procedure calls to express iteration, Scheme emphasized the fact that tail- recursive procedure calls are essentially goto\u2019s that pass arguments. Scheme was the \ufb01rst widely used program- ming language to embrace \ufb01rst class escape procedures, from which all previously known sequential control struc- tures can be synthesized. A subsequent "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 5632
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "version of Scheme introduced the concept of exact and inexact numbers, an extension of Common Lisp\u2019s generic arithmetic. More re- cently, Scheme became the \ufb01rst programming language to support hygienic macros, which permit the syntax of a block-structured language to be extended in a consistent and reliable manner. Background The \ufb01rst description of Scheme was written in 1975 [ 28]. A revised report [ 25] appeared in 1978, which described the evolution of the language as its MIT implementation was upgraded "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 6144
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "to support an innovative compiler [ 26]. Three distinct projects began in 1981 and 1982 to use variants of Scheme for courses at MIT, Yale, and Indiana Univer- sity [21,17,10]. An introductory computer science text- book using Scheme was published in 1984 [ 1]. As Scheme became more widespread, local dialects be- gan to diverge until students and researchers occasion- ally found it di\ufb03cult to understand code written at other sites. Fifteen representatives of the major implementations of Scheme therefore met"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 6656
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " in October 1984 to work toward a better and more widely accepted standard for Scheme. Their report [ 4] was published at MIT and Indiana Uni- versity in the summer of 1985. Further revision took place in the spring of 1986 [ 23], and in the spring of 1988 [ 6]. The present report re\ufb02ects further revisions agreed upon in a meeting at Xerox PARC in June 1992. We intend this report to belong to the entire Scheme com-munity, and so we grant permission to copy it in whole or in part without fee. In particular, "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 7168
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "we encourage implementors of Scheme to use this report as a starting point for manuals and other documentation, modifying it as necessary. Acknowledgements We would like to thank the following people for their help: Alan Bawden, Michael Blair, George Carrette, Andy Cromarty, Pavel Curtis, Je\ufb00 Dalton, Olivier Danvy, Ken Dickey, Bruce Duba, Marc Feeley, Andy Freeman, Richard Gabriel, Yekta G\u00a8 ursel, Ken Haase, Robert Hieb, Paul Hudak, Morry Katz, Chris Lindblad, Mark Meyer, Jim Miller, Jim Philbin, John Ramsd"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 7680
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ell, Mike Sha\ufb00, Jonathan Shapiro, Julie Sussman, Perry Wagle, Daniel Weise, Henry Wu, and Ozan Yigit. We thank Carol Fessenden, Daniel Friedman, and Christopher Haynes for permission to use text from the Scheme 311 version 4 reference manual. We thank Texas Instruments, Inc. for permission to use text from the TI Scheme Language Reference Manual [30]. We gladly acknowledge the in\ufb02uence of manuals for MIT Scheme [ 17], T [22], Scheme 84 [ 11], Common Lisp [ 27], and Algol 60 [ 18]. We also thank Betty Dexter"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 8192
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " for the extreme e\ufb00ort she put into setting this report in T EX, and Donald Knuth for de- signing the program that caused her troubles. The Arti\ufb01cial Intelligence Laboratory of the Massachusetts Institute of Technology, the Computer Science Department of Indiana University, the Computer and Information Sci- ences Department of the University of Oregon, and the NEC Research Institute supported the preparation of this report. Support for the MIT work was provided in part by the Advanced Research Projects Agen"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 8704
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "cy of the Department of Defense under O\ufb03ce of Naval Research contract N00014- 80-C-0505. Support for the Indiana University work was provided by NSF grants NCS 83-04567 and NCS 83-03325.1. Overview of Scheme 3 DESCRIPTION OF THE LANGUAGE 1. Overview of Scheme 1.1. Semantics This section gives an overview of Scheme\u2019s semantics. A detailed informal semantics is the subject of chapters 3 through 6. For reference purposes, section 7.2provides a formal semantics of Scheme. Following Algol, Scheme is a statically"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 9216
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " scoped program- ming language. Each use of a variable is associated with a lexically apparent binding of that variable. Scheme has latent as opposed to manifest types. Types are associated with values (also called objects) rather than with variables. (Some authors refer to languages with latent types as weakly typed or dynamically typed lan- guages.) Other languages with latent types are APL, Snobol, and other dialects of Lisp. Languages with mani- fest types (sometimes referred to as strongly typed or sta"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 9728
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "t- ically typed languages) include Algol 60, Pascal, and C. All objects created in the course of a Scheme computation, including procedures and continuations, have unlimited ex- tent. No Scheme object is ever destroyed. The reason that implementations of Scheme do not (usually!) run out of storage is that they are permitted to reclaim the storage occupied by an object if they can prove that the object cannot possibly matter to any future computation. Other languages in which most objects have unlimited exte"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 10240
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "nt in- clude APL and other Lisp dialects. Implementations of Scheme are required to be properly tail-recursive. This allows the execution of an iterative computation in constant space, even if the iterative compu- tation is described by a syntactically recursive procedure. Thus with a properly tail-recursive implementation, iter- ation can be expressed using the ordinary procedure-call mechanics, so that special iteration constructs are useful only as syntactic sugar. See section 3.5. Scheme procedures are "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 10752
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "objects in their own right. Pro- cedures can be created dynamically, stored in data struc- tures, returned as results of procedures, and so on. Other languages with these properties include Common Lisp and ML. One distinguishing feature of Scheme is that continuations, which in most other languages only operate behind the scenes, also have \u201c\ufb01rst-class\u201d status. Continuations are useful for implementing a wide variety of advanced control constructs, including non-local exits, backtracking, and coroutines. See"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 11264
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " section 6.4. Arguments to Scheme procedures are always passed by value, which means that the actual argument expressions are evaluated before the procedure gains control, whether the procedure needs the result of the evaluation or not.ML, C, and APL are three other languages that always pass arguments by value. This is distinct from the lazy- evaluation semantics of Haskell, or the call-by-name se- mantics of Algol 60, where an argument expression is not evaluated unless its value is needed by the procedur"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 11776
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "e. Scheme\u2019s model of arithmetic is designed to remain as in- dependent as possible of the particular ways in which num- bers are represented within a computer. In Scheme, every integer is a rational number, every rational is a real, and every real is a complex number. Thus the distinction be- tween integer and real arithmetic, so important to many programming languages, does not appear in Scheme. In its place is a distinction between exact arithmetic, which cor- responds to the mathematical ideal, and inexa"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 12288
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ct arithmetic on approximations. As in Common Lisp, exact arithmetic is not limited to integers. 1.2. Syntax Scheme, like most dialects of Lisp, employs a fully paren- thesized pre\ufb01x notation for programs and (other) data; the grammar of Scheme generates a sublanguage of the lan- guage used for data. An important consequence of this sim- ple, uniform representation is the susceptibility of Scheme programs and data to uniform treatment by other Scheme programs. For example, the eval procedure evaluates a Sch"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 12800
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "eme program expressed as data. Theread procedure performs syntactic as well as lexical decomposition of the data it reads. The read procedure parses its input as data (section 7.1.2 ), not as program. The formal syntax of Scheme is described in section 7.1. 1.3. Notation and terminology 1.3.1. Primitive, library, and optional features It is required that every implementation of Scheme support all features that are not marked as being optional . Imple- mentations are free to omit optional features of Scheme "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 13312
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "or to add extensions, provided the extensions are not in con\ufb02ict with the language reported here. In particular, implementations must support portable code by providing a syntactic mode that preempts no lexical conventions of this report. To aid in understanding and implementing Scheme, some features are marked as library . These can be easily imple- mented in terms of the other, primitive, features. They are redundant in the strict sense of the word, but they capture common patterns of usage, and are there"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 13824
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "fore provided as convenient abbreviations.4 Revised5Scheme 1.3.2. Error situations and unspeci\ufb01ed behavior When speaking of an error situation, this report uses the phrase \u201can error is signalled\u201d to indicate that implemen- tations must detect and report the error. If such wording does not appear in the discussion of an error, then imple- mentations are not required to detect or report the error, though they are encouraged to do so. An error situation that implementations are not required to detect is usuall"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 14336
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "y referred to simply as \u201can error.\u201d For example, it is an error for a procedure to be passed an argument that the procedure is not explicitly speci\ufb01ed to handle, even though such domain errors are seldom men- tioned in this report. Implementations may extend a pro- cedure\u2019s domain of de\ufb01nition to include such arguments. This report uses the phrase \u201cmay report a violation of an implementation restriction\u201d to indicate circumstances un- der which an implementation is permitted to report that it is unable to co"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 14848
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ntinue execution of a correct program be- cause of some restriction imposed by the implementation. Implementation restrictions are of course discouraged, but implementations are encouraged to report violations of im- plementation restrictions. For example, an implementation may report a violation of an implementation restriction if it does not have enough storage to run a program. If the value of an expression is said to be \u201cunspeci\ufb01ed,\u201d then the expression must evaluate to some object without signalling an"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 15360
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " error, but the value depends on the imple- mentation; this report explicitly does not say what value should be returned. 1.3.3. Entry format Chapters 4and6are organized into entries. Each entry de- scribes one language feature or a group of related features, where a feature is either a syntactic construct or a built-in procedure. An entry begins with one or more header lines of the form template category for required, primitive features, or template quali\ufb01er category where quali\ufb01er is either \u201clibrary\u201d or \u201c"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 15872
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "optional\u201d as de\ufb01ned in section 1.3.1 . Ifcategory is \u201csyntax\u201d, the entry describes an expression type, and the template gives the syntax of the expression type. Components of expressions are designated by syn- tactic variables, which are written using angle brackets, for example,\u27e8expression\u27e9,\u27e8variable\u27e9. Syntactic variables should be understood to denote segments of program text; for example,\u27e8expression\u27e9stands for any string of charac- ters which is a syntactically valid expression. The notation\u27e8thing 1\u27e9... "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 16384
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "indicates zero or more occurrences of a \u27e8thing\u27e9, and \u27e8thing 1\u27e9\u27e8thing 2\u27e9... indicates one or more occurrences of a \u27e8thing\u27e9. Ifcategory is \u201cprocedure\u201d, then the entry describes a pro- cedure, and the header line gives a template for a call to the procedure. Argument names in the template are italicized . Thus the header line (vector-ref vector k) procedure indicates that the built-in procedure vector-ref takes two arguments, a vector vector and an exact non-negative in- teger k(see below). The header lines (m"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 16896
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ake-vector k) procedure (make-vector k \ufb01ll) procedure indicate that the make-vector procedure must be de\ufb01ned to take either one or two arguments. It is an error for an operation to be presented with an ar- gument that it is not speci\ufb01ed to handle. For succinctness, we follow the convention that if an argument name is also the name of a type listed in section 3.2, then that argu- ment must be of the named type. For example, the header line forvector-ref given above dictates that the \ufb01rst ar- gument to vector"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 17408
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "-ref must be a vector. The following naming conventions also imply type restrictions: obj any object list,list1,... listj,... list (see section 6.3.2 ) z,z1,... zj,... complex number x,x1,... xj,... real number y,y1,... yj,... real number q,q1,... qj,... rational number n,n1,... nj,... integer k,k1,... kj,... exact non-negative integer 1.3.4. Evaluation examples The symbol \u201c=\u21d2\u201d used in program examples should be read \u201cevaluates to.\u201d For example, (* 5 8) =\u21d240 means that the expression (* 5 8) evaluates to th"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 17920
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "e ob- ject40. Or, more precisely: the expression given by the sequence of characters \u201c (* 5 8) \u201d evaluates, in the initial environment, to an object that may be represented exter- nally by the sequence of characters \u201c 40\u201d. See section 3.3 for a discussion of external representations of objects. 1.3.5. Naming conventions By convention, the names of procedures that always return a boolean value usually end in \u201c ?\u201d. Such procedures are called predicates.2. Lexical conventions 5 By convention, the names of proc"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 18432
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "edures that store values into previously allocated locations (see section 3.4) usually end in \u201c!\u201d. Such procedures are called mutation proce- dures. By convention, the value returned by a mutation procedure is unspeci\ufb01ed. By convention, \u201c ->\u201d appears within the names of proce- dures that take an object of one type and return an anal- ogous object of another type. For example, list->vector takes a list and returns a vector whose elements are the same as those of the list. 2. Lexical conventions This section "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 18944
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "gives an informal account of some of the lexical conventions used in writing Scheme programs. For a formal syntax of Scheme, see section 7.1. Upper and lower case forms of a letter are never distin- guished except within character and string constants. For example, Foois the same identi\ufb01er as FOO, and#x1AB is the same number as #X1ab . 2.1. Identi\ufb01ers Most identi\ufb01ers allowed by other programming languages are also acceptable to Scheme. The precise rules for form- ing identi\ufb01ers vary among implementations of"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 19456
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " Scheme, but in all implementations a sequence of letters, digits, and \u201cex- tended alphabetic characters\u201d that begins with a character that cannot begin a number is an identi\ufb01er. In addition, +,-, and...are identi\ufb01ers. Here are some examples of identi\ufb01ers: lambda q list->vector soup + V17a <=? a34kTMNs the-word-recursion-has-many-meanings Extended alphabetic characters may be used within iden- ti\ufb01ers as if they were letters. The following are extended alphabetic characters: ! $ % & * + - . / : < = > ? @ ^ _"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 19968
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " ~ See section 7.1.1 for a formal syntax of identi\ufb01ers. Identi\ufb01ers have two uses within Scheme programs: \u2022Any identi\ufb01er may be used as a variable or as a syn- tactic keyword (see sections 3.1and4.3). \u2022When an identi\ufb01er appears as a literal or within a literal (see section 4.1.2 ), it is being used to denote a symbol (see section 6.3.3 ).2.2. Whitespace and comments Whitespace characters are spaces and newlines. (Imple- mentations typically provide additional whitespace char- acters such as tab or page break"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 20480
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": ".) Whitespace is used for improved readability and as necessary to separate tokens from each other, a token being an indivisible lexical unit such as an identi\ufb01er or number, but is otherwise insigni\ufb01- cant. Whitespace may occur between any two tokens, but not within a token. Whitespace may also occur inside a string, where it is signi\ufb01cant. A semicolon ( ;) indicates the start of a comment. The comment continues to the end of the line on which the semicolon appears. Comments are invisible to Scheme, but the"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 20992
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " end of the line is visible as whitespace. This prevents a comment from appearing in the middle of an identi\ufb01er or number. ;;; The FACT procedure computes the factorial ;;; of a non-negative integer. (define fact (lambda (n) (if (= n 0) 1 ;Base case: return 1 (* n (fact (- n 1)))))) 2.3. Other notations For a description of the notations used for numbers, see section 6.2. . + - These are used in numbers, and may also occur anywhere in an identi\ufb01er except as the \ufb01rst charac- ter. A delimited plus or minus si"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 21504
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "gn by itself is also an identi\ufb01er. A delimited period (not occurring within a number or identi\ufb01er) is used in the notation for pairs (section 6.3.2 ), and to indicate a rest-parameter in a formal parameter list (section 4.1.4 ). A delimited se- quence of three successive periods is also an identi\ufb01er. ( )Parentheses are used for grouping and to notate lists (section 6.3.2 ). \u2019The single quote character is used to indicate literal data (section 4.1.2 ). `The backquote character is used to indicate almost- con"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 22016
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "stant data (section 4.2.6 ). , ,@ The character comma and the sequence comma at- sign are used in conjunction with backquote (sec- tion4.2.6 ). \"The double quote character is used to delimit strings (section 6.3.5 ).6 Revised5Scheme \\Backslash is used in the syntax for character constants (section 6.3.4 ) and as an escape character within string constants (section 6.3.5 ). [ ] { } | Left and right square brackets and curly braces and vertical bar are reserved for possible future exten- sions to the language"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 22528
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": ". #Sharp sign is used for a variety of purposes depending on the character that immediately follows it: #t #f These are the boolean constants (section 6.3.1 ). #\\This introduces a character constant (section 6.3.4 ). #(This introduces a vector constant (section 6.3.6 ). Vec- tor constants are terminated by ). #e #i #b #o #d #x These are used in the notation for numbers (section 6.2.4 ). 3. Basic concepts 3.1. Variables, syntactic keywords, and re- gions An identi\ufb01er may name a type of syntax, or it may name"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 23040
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " a location where a value can be stored. An identi\ufb01er that names a type of syntax is called a syntactic keyword and is said to be bound to that syntax. An identi\ufb01er that names a location is called a variable and is said to be bound to that location. The set of all visible bindings in e\ufb00ect at some point in a program is known as the environment in e\ufb00ect at that point. The value stored in the location to which a variable is bound is called the variable\u2019s value. By abuse of terminology, the variable is sometim"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 23552
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "es said to name the value or to be bound to the value. This is not quite accurate, but confusion rarely results from this practice. Certain expression types are used to create new kinds of syntax and bind syntactic keywords to those new syntaxes, while other expression types create new locations and bind variables to those locations. These expression types are called binding constructs . Those that bind syntactic key- words are listed in section 4.3. The most fundamental of the variable binding constructs i"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 24064
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "s the lambda expression, because all other variable binding constructs can be ex- plained in terms of lambda expressions. The other variable binding constructs are let,let* ,letrec , anddoexpres- sions (see sections 4.1.4 ,4.2.2 , and 4.2.4 ). Like Algol and Pascal, and unlike most other dialects of Lisp except for Common Lisp, Scheme is a statically scoped language with block structure. To each place where an identi\ufb01er is bound in a program there corresponds a region of the program text within which the bi"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 24576
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "nding is visible.The region is determined by the particular binding con- struct that establishes the binding; if the binding is estab- lished by a lambda expression, for example, then its region is the entire lambda expression. Every mention of an iden- ti\ufb01er refers to the binding of the identi\ufb01er that established the innermost of the regions containing the use. If there is no binding of the identi\ufb01er whose region contains the use, then the use refers to the binding for the variable in the top level environ"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 25088
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ment, if any (chapters 4and6); if there is no binding for the identi\ufb01er, it is said to be unbound . 3.2. Disjointness of types No object satis\ufb01es more than one of the following predi- cates: boolean? pair? symbol? number? char? string? vector? port? procedure? These predicates de\ufb01ne the types boolean ,pair,symbol , number ,char (orcharacter ),string ,vector ,port, and pro- cedure . The empty list is a special object of its own type; it satis\ufb01es none of the above predicates. Although there is a separate bool"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 25600
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ean type, any Scheme value can be used as a boolean value for the purpose of a conditional test. As explained in section 6.3.1 , all values count as true in such a test except for #f. This report uses the word \u201ctrue\u201d to refer to any Scheme value except #f, and the word \u201cfalse\u201d to refer to #f. 3.3. External representations An important concept in Scheme (and Lisp) is that of the external representation of an object as a sequence of char- acters. For example, an external representation of the inte- ger 28 is "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 26112
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "the sequence of characters \u201c 28\u201d, and an external representation of a list consisting of the integers 8 and 13 is the sequence of characters \u201c (8 13) \u201d. The external representation of an object is not neces- sarily unique. The integer 28 also has representations \u201c#e28.000 \u201d and \u201c#x1c \u201d, and the list in the previous para- graph also has the representations \u201c ( 08 13 ) \u201d and \u201c(8 . (13 . ())) \u201d (see section 6.3.2 ). Many objects have standard external representations, but some, such as procedures, do not have "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 26624
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "standard represen- tations (although particular implementations may de\ufb01ne representations for them). An external representation may be written in a program to obtain the corresponding object (see quote , section 4.1.2 ).3. Basic concepts 7 External representations can also be used for input and output. The procedure read (section 6.6.2 ) parses ex- ternal representations, and the procedure write (sec- tion6.6.3 ) generates them. Together, they provide an elegant and powerful input/output facility. Note that"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 27136
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " the sequence of characters \u201c (+ 2 6) \u201d isnotan external representation of the integer 8, even though it isan expression evaluating to the integer 8; rather, it is an exter- nal representation of a three-element list, the elements of which are the symbol +and the integers 2 and 6. Scheme\u2019s syntax has the property that any sequence of characters that is an expression is also the external representation of some object. This can lead to confusion, since it may not be obvious out of context whether a given sequ"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 27648
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ence of char- acters is intended to denote data or program, but it is also a source of power, since it facilitates writing programs such as interpreters and compilers that treat programs as data (or vice versa). The syntax of external representations of various kinds of objects accompanies the description of the primitives for manipulating the objects in the appropriate sections of chapter 6. 3.4. Storage model Variables and objects such as pairs, vectors, and strings implicitly denote locations or sequence"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 28160
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "s of locations. A string, for example, denotes as many locations as there are characters in the string. (These locations need not correspond to a full machine word.) A new value may be stored into one of these locations using the string-set! procedure, but the string continues to denote the same locations as before. An object fetched from a location, by a variable reference or by a procedure such as car,vector-ref , orstring-ref , is equivalent in the sense of eqv? (section 6.1) to the object last stored in"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 28672
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " the location before the fetch. Every location is marked to show whether it is in use. No variable or object ever refers to a location that is not in use. Whenever this report speaks of storage being allocated for a variable or object, what is meant is that an appropriate number of locations are chosen from the set of locations that are not in use, and the chosen locations are marked to indicate that they are now in use before the variable or object is made to denote them. In many systems it is desirable fo"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 29184
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "r constants (i.e. the val- ues of literal expressions) to reside in read-only-memory. To express this, it is convenient to imagine that every object that denotes locations is associated with a \ufb02ag telling whether that object is mutable or immutable. In such systems literal constants and the strings returned by symbol->string are immutable objects, while all objectscreated by the other procedures listed in this report are mutable. It is an error to attempt to store a new value into a location that is denoted"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 29696
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " by an immutable object. 3.5. Proper tail recursion Implementations of Scheme are required to be properly tail- recursive . Procedure calls that occur in certain syntactic contexts de\ufb01ned below are \u2018tail calls\u2019. A Scheme imple- mentation is properly tail-recursive if it supports an un- bounded number of active tail calls. A call is active if the called procedure may still return. Note that this in- cludes calls that may be returned from either by the cur- rent continuation or by continuations captured earli"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 30208
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "er by call-with-current-continuation that are later invoked. In the absence of captured continuations, calls could return at most once and the active calls would be those that had not yet returned. A formal de\ufb01nition of proper tail recur- sion can be found in [ 8]. Rationale: Intuitively, no space is needed for an active tail call because the continuation that is used in the tail call has the same semantics as the continuation passed to the procedure containing the call. Although an improper implementation "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 30720
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "might use a new con- tinuation in the call, a return to this new continuation would be followed immediately by a return to the continuation passed to the procedure. A properly tail-recursive implementation re- turns to that continuation directly. Proper tail recursion was one of the central ideas in Steele and Sussman\u2019s original version of Scheme. Their \ufb01rst Scheme in- terpreter implemented both functions and actors. Control \ufb02ow was expressed using actors, which di\ufb00ered from functions in that they passed th"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 31232
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "eir results on to another actor instead of returning to a caller. In the terminology of this section, each actor \ufb01nished with a tail call to another actor. Steele and Sussman later observed that in their interpreter the code for dealing with actors was identical to that for functions and thus there was no need to include both in the language. Atail call is a procedure call that occurs in a tail con- text. Tail contexts are de\ufb01ned inductively. Note that a tail context is always determined with respect to a p"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 31744
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "articular lambda expression. \u2022The last expression within the body of a lambda ex- pression, shown as \u27e8tail expression\u27e9below, occurs in a tail context. (lambda\u27e8formals\u27e9 \u27e8de\ufb01nition\u27e9*\u27e8expression\u27e9*\u27e8tail expression\u27e9) \u2022If one of the following expressions is in a tail context, then the subexpressions shown as \u27e8tail expression\u27e9are in a tail context. These were derived from rules in8 Revised5Scheme the grammar given in chapter 7by replacing some oc- currences of\u27e8expression\u27e9with\u27e8tail expression\u27e9. Only those rules tha"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 32256
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "t contain tail contexts are shown here. (if\u27e8expression\u27e9 \u27e8tail expression\u27e9 \u27e8tail expression\u27e9) (if\u27e8expression\u27e9 \u27e8tail expression\u27e9) (cond\u27e8cond clause\u27e9+) (cond\u27e8cond clause\u27e9*(else\u27e8tail sequence\u27e9)) (case\u27e8expression\u27e9 \u27e8case clause\u27e9+) (case\u27e8expression\u27e9 \u27e8case clause\u27e9* (else\u27e8tail sequence\u27e9)) (and\u27e8expression\u27e9*\u27e8tail expression\u27e9) (or\u27e8expression\u27e9*\u27e8tail expression\u27e9) (let (\u27e8binding spec\u27e9*)\u27e8tail body\u27e9) (let\u27e8variable\u27e9(\u27e8binding spec\u27e9*)\u27e8tail body\u27e9) (let* (\u27e8binding spec\u27e9*)\u27e8tail body\u27e9) (letrec (\u27e8binding spec\u27e9*)\u27e8tail body\u27e9) (let-sy"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 32768
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ntax (\u27e8syntax spec\u27e9*)\u27e8tail body\u27e9) (letrec-syntax ( \u27e8syntax spec\u27e9*)\u27e8tail body\u27e9) (begin\u27e8tail sequence\u27e9) (do (\u27e8iteration spec\u27e9*) (\u27e8test\u27e9 \u27e8tail sequence\u27e9) \u27e8expression\u27e9*) where \u27e8cond clause\u27e9 \u2212\u2192(\u27e8test\u27e9 \u27e8tail sequence\u27e9) \u27e8case clause\u27e9 \u2212\u2192((\u27e8datum\u27e9*)\u27e8tail sequence\u27e9) \u27e8tail body\u27e9 \u2212\u2192 \u27e8 de\ufb01nition\u27e9*\u27e8tail sequence\u27e9 \u27e8tail sequence\u27e9 \u2212\u2192 \u27e8 expression\u27e9*\u27e8tail expression\u27e9 \u2022If acond expression is in a tail context, and has a clause of the form (\u27e8expression 1\u27e9=>\u27e8expression 2\u27e9) then the (implied) call to the procedure that results f"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 33280
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "rom the evaluation of \u27e8expression 2\u27e9is in a tail context. \u27e8expression 2\u27e9itself is not in a tail context. Certain built-in procedures are also required to perform tail calls. The \ufb01rst argument passed to apply and to call-with-current-continuation , and the second argu- ment passed to call-with-values , must be called via a tail call. Similarly, eval must evaluate its argument as if it were in tail position within the eval procedure.In the following example the only tail call is the call to f. None of the cal"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 33792
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ls to gorhare tail calls. The reference to xis in a tail context, but it is not a call and thus is not a tail call. (lambda () (if (g) (let ((x (h))) x) (and (g) (f)))) Note: Implementations are allowed, but not required, to recog- nize that some non-tail calls, such as the call to habove, can be evaluated as though they were tail calls. In the example above, theletexpression could be compiled as a tail call to h. (The possibility of hreturning an unexpected number of values can be ignored, because in that "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 34304
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "case the e\ufb00ect of the letis explicitly unspeci\ufb01ed and implementation-dependent.) 4. Expressions Expression types are categorized as primitive orderived . Primitive expression types include variables and procedure calls. Derived expression types are not semantically prim- itive, but can instead be de\ufb01ned as macros. With the ex- ception of quasiquote , whose macro de\ufb01nition is complex, the derived expressions are classi\ufb01ed as library features. Suitable de\ufb01nitions are given in section 7.3. 4.1. Primitive expre"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 34816
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ssion types 4.1.1. Variable references \u27e8variable\u27e9 syntax An expression consisting of a variable (section 3.1) is a variable reference. The value of the variable reference is the value stored in the location to which the variable is bound. It is an error to reference an unbound variable. (define x 28) x =\u21d228 4.1.2. Literal expressions (quote\u27e8datum\u27e9) syntax \u2019\u27e8datum\u27e9 syntax \u27e8constant\u27e9 syntax (quote\u27e8datum\u27e9)evaluates to\u27e8datum\u27e9.\u27e8Datum\u27e9may be any external representation of a Scheme object (see sec- tion3.3). This "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 35328
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "notation is used to include literal constants in Scheme code. (quote a) =\u21d2a (quote #(a b c)) =\u21d2#(a b c) (quote (+ 1 2)) =\u21d2(+ 1 2)4. Expressions 9 (quote\u27e8datum\u27e9)may be abbreviated as \u2019\u27e8datum\u27e9. The two notations are equivalent in all respects. \u2019a =\u21d2a \u2019#(a b c) =\u21d2#(a b c) \u2019() =\u21d2() \u2019(+ 1 2) =\u21d2(+ 1 2) \u2019(quote a) =\u21d2(quote a) \u2019\u2019a =\u21d2(quote a) Numerical constants, string constants, character constants, and boolean constants evaluate \u201cto themselves\u201d; they need not be quoted. \u2019\"abc\" =\u21d2\"abc\" \"abc\" =\u21d2\"abc\" \u2019145932 =\u21d2145"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 35840
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "932 145932 =\u21d2145932 \u2019#t =\u21d2#t #t =\u21d2#t As noted in section 3.4, it is an error to alter a constant (i.e. the value of a literal expression) using a mutation pro- cedure like set-car! orstring-set! . 4.1.3. Procedure calls (\u27e8operator\u27e9 \u27e8operand 1\u27e9...) syntax A procedure call is written by simply enclosing in paren- theses expressions for the procedure to be called and the arguments to be passed to it. The operator and operand expressions are evaluated (in an unspeci\ufb01ed order) and the resulting procedure is pass"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 36352
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ed the resulting arguments. (+ 3 4) =\u21d27 ((if #f + *) 3 4) =\u21d212 A number of procedures are available as the values of vari- ables in the initial environment; for example, the addition and multiplication procedures in the above examples are the values of the variables +and*. New procedures are cre- ated by evaluating lambda expressions (see section 4.1.4 ). Procedure calls may return any number of values (see values in section 6.4). With the exception of values the procedures available in the initial environm"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 36864
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ent return one value or, for procedures such as apply , pass on the values returned by a call to one of their arguments. Procedure calls are also called combinations . Note: In contrast to other dialects of Lisp, the order of evaluation is unspeci\ufb01ed, and the operator expression and the operand expressions are always evaluated with the same evalu- ation rules. Note: Although the order of evaluation is otherwise unspeci- \ufb01ed, the e\ufb00ect of any concurrent evaluation of the operator and operand expressions is c"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 37376
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "onstrained to be consistent with some sequential order of evaluation. The order of evaluation may be chosen di\ufb00erently for each procedure call.Note: In many dialects of Lisp, the empty combination, (), is a legitimate expression. In Scheme, combinations must have at least one subexpression, so ()is not a syntactically valid expression. 4.1.4. Procedures (lambda\u27e8formals\u27e9 \u27e8body\u27e9) syntax Syntax:\u27e8Formals\u27e9should be a formal arguments list as described below, and \u27e8body\u27e9should be a sequence of one or more expressi"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 37888
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ons. Semantics: Alambda expression evaluates to a procedure. The environment in e\ufb00ect when the lambda expression was evaluated is remembered as part of the procedure. When the procedure is later called with some actual arguments, the environment in which the lambda expression was evalu- ated will be extended by binding the variables in the formal argument list to fresh locations, the corresponding actual argument values will be stored in those locations, and the expressions in the body of the lambda express"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 38400
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ion will be evaluated sequentially in the extended environment. The result(s) of the last expression in the body will be returned as the result(s) of the procedure call. (lambda (x) (+ x x)) =\u21d2 a procedure ((lambda (x) (+ x x)) 4) =\u21d28 (define reverse-subtract (lambda (x y) (- y x))) (reverse-subtract 7 10) =\u21d23 (define add4 (let ((x 4)) (lambda (y) (+ x y)))) (add4 6) =\u21d210 \u27e8Formals\u27e9should have one of the following forms: \u2022(\u27e8variable 1\u27e9...): The procedure takes a \ufb01xed num- ber of arguments; when the procedure"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 38912
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " is called, the arguments will be stored in the bindings of the corre- sponding variables. \u2022 \u27e8variable\u27e9: The procedure takes any number of ar- guments; when the procedure is called, the sequence of actual arguments is converted into a newly allo- cated list, and the list is stored in the binding of the \u27e8variable\u27e9. \u2022(\u27e8variable 1\u27e9...\u27e8variablen\u27e9.\u27e8variablen+1\u27e9): If a space-delimited period precedes the last variable, then the procedure takes nor more arguments, where n is the number of formal arguments before t"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 39424
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "he period (there must be at least one). The value stored in the binding of the last variable will be a newly allocated list of the actual arguments left over after all the other actual arguments have been matched up against the other formal arguments.10 Revised5Scheme It is an error for a \u27e8variable\u27e9to appear more than once in \u27e8formals\u27e9. ((lambda x x) 3 4 5 6) =\u21d2(3 4 5 6) ((lambda (x y . z) z) 3 4 5 6) =\u21d2(5 6) Each procedure created as the result of evaluating a lambda expression is (conceptually) tagged wit"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 39936
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "h a storage location, in order to make eqv? andeq?work on procedures (see section 6.1). 4.1.5. Conditionals (if\u27e8test\u27e9 \u27e8consequent\u27e9 \u27e8alternate\u27e9) syntax (if\u27e8test\u27e9 \u27e8consequent\u27e9) syntax Syntax:\u27e8Test\u27e9,\u27e8consequent\u27e9, and\u27e8alternate\u27e9may be arbi- trary expressions. Semantics: Anifexpression is evaluated as follows: \ufb01rst, \u27e8test\u27e9is evaluated. If it yields a true value (see sec- tion6.3.1 ), then\u27e8consequent\u27e9is evaluated and its value(s) is(are) returned. Otherwise \u27e8alternate\u27e9is evaluated and its value(s) is(are) returne"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 40448
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "d. If \u27e8test\u27e9yields a false value and no\u27e8alternate\u27e9is speci\ufb01ed, then the result of the expression is unspeci\ufb01ed. (if (> 3 2) \u2019yes \u2019no) =\u21d2yes (if (> 2 3) \u2019yes \u2019no) =\u21d2no (if (> 3 2) (- 3 2) (+ 3 2)) =\u21d21 4.1.6. Assignments (set!\u27e8variable\u27e9 \u27e8expression\u27e9) syntax \u27e8Expression\u27e9is evaluated, and the resulting value is stored in the location to which \u27e8variable\u27e9is bound.\u27e8Variable\u27e9 must be bound either in some region enclosing the set! expression or at top level. The result of the set! expression is unspeci\ufb01ed. (define x"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 40960
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " 2) (+ x 1) =\u21d23 (set! x 4) =\u21d2 unspeci\ufb01ed (+ x 1) =\u21d25 4.2. Derived expression types The constructs in this section are hygienic, as discussed in section 4.3. For reference purposes, section 7.3gives macro de\ufb01nitions that will convert most of the constructs described in this section into the primitive constructs de- scribed in the previous section.4.2.1. Conditionals (cond\u27e8clause 1\u27e9 \u27e8clause 2\u27e9...) library syntax Syntax: Each\u27e8clause\u27e9should be of the form (\u27e8test\u27e9 \u27e8expression 1\u27e9...) where\u27e8test\u27e9is any expression."}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 41472
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " Alternatively, a \u27e8clause\u27e9 may be of the form (\u27e8test\u27e9=>\u27e8expression\u27e9) The last\u27e8clause\u27e9may be an \u201celse clause,\u201d which has the form (else\u27e8expression 1\u27e9 \u27e8expression 2\u27e9...). Semantics: Acond expression is evaluated by evaluating the\u27e8test\u27e9expressions of successive \u27e8clause\u27e9s in order until one of them evaluates to a true value (see section 6.3.1 ). When a\u27e8test\u27e9evaluates to a true value, then the remain- ing\u27e8expression\u27e9s in its\u27e8clause\u27e9are evaluated in order, and the result(s) of the last \u27e8expression\u27e9in the\u27e8clause\u27e9 "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 41984
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "is(are) returned as the result(s) of the entire cond expres- sion. If the selected \u27e8clause\u27e9contains only the \u27e8test\u27e9and no \u27e8expression\u27e9s, then the value of the \u27e8test\u27e9is returned as the result. If the selected \u27e8clause\u27e9uses the=>alternate form, then the\u27e8expression\u27e9is evaluated. Its value must be a pro- cedure that accepts one argument; this procedure is then called on the value of the \u27e8test\u27e9and the value(s) returned by this procedure is(are) returned by the cond expression. If all\u27e8test\u27e9s evaluate to false valu"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 42496
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "es, and there is no else clause, then the result of the conditional expression is un- speci\ufb01ed; if there is an else clause, then its \u27e8expression\u27e9s are evaluated, and the value(s) of the last one is(are) returned. (cond ((> 3 2) \u2019greater) ((< 3 2) \u2019less)) =\u21d2greater (cond ((> 3 3) \u2019greater) ((< 3 3) \u2019less) (else \u2019equal)) =\u21d2equal (cond ((assv \u2019b \u2019((a 1) (b 2))) => cadr) (else #f)) =\u21d22 (case\u27e8key\u27e9 \u27e8clause 1\u27e9 \u27e8clause 2\u27e9...) library syntax Syntax:\u27e8Key\u27e9may be any expression. Each \u27e8clause\u27e9 should have the form ((\u27e8da"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 43008
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "tum 1\u27e9...)\u27e8expression 1\u27e9 \u27e8expression 2\u27e9...), where each\u27e8datum\u27e9is an external representation of some object. All the \u27e8datum\u27e9s must be distinct. The last \u27e8clause\u27e9may be an \u201celse clause,\u201d which has the form (else\u27e8expression 1\u27e9 \u27e8expression 2\u27e9...). Semantics: Acase expression is evaluated as follows. \u27e8Key\u27e9is evaluated and its result is compared against each \u27e8datum\u27e9. If the result of evaluating \u27e8key\u27e9is equivalent (in the sense of eqv? ; see section 6.1) to a\u27e8datum\u27e9, then the expressions in the corresponding \u27e8clau"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 43520
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "se\u27e9are evaluated from left to right and the result(s) of the last expression in4. Expressions 11 the\u27e8clause\u27e9is(are) returned as the result(s) of the case ex- pression. If the result of evaluating \u27e8key\u27e9is di\ufb00erent from every\u27e8datum\u27e9, then if there is an else clause its expres- sions are evaluated and the result(s) of the last is(are) the result(s) of the case expression; otherwise the result of the case expression is unspeci\ufb01ed. (case (* 2 3) ((2 3 5 7) \u2019prime) ((1 4 6 8 9) \u2019composite)) =\u21d2composite (case (car"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 44032
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " \u2019(c d)) ((a) \u2019a) ((b) \u2019b)) =\u21d2 unspeci\ufb01ed (case (car \u2019(c d)) ((a e i o u) \u2019vowel) ((w y) \u2019semivowel) (else \u2019consonant)) =\u21d2consonant (and\u27e8test1\u27e9...) library syntax The\u27e8test\u27e9expressions are evaluated from left to right, and the value of the \ufb01rst expression that evaluates to a false value (see section 6.3.1 ) is returned. Any remaining ex- pressions are not evaluated. If all the expressions evaluate to true values, the value of the last expression is returned. If there are no expressions then #tis returned. (a"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 44544
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "nd (= 2 2) (> 2 1)) =\u21d2#t (and (= 2 2) (< 2 1)) =\u21d2#f (and 1 2 \u2019c \u2019(f g)) =\u21d2(f g) (and) =\u21d2#t (or\u27e8test1\u27e9...) library syntax The\u27e8test\u27e9expressions are evaluated from left to right, and the value of the \ufb01rst expression that evaluates to a true value (see section 6.3.1 ) is returned. Any remaining ex- pressions are not evaluated. If all expressions evaluate to false values, the value of the last expression is returned. If there are no expressions then #fis returned. (or (= 2 2) (> 2 1)) =\u21d2#t (or (= 2 2) (< 2 1)) ="}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 45056
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "\u21d2#t (or #f #f #f) =\u21d2#f (or (memq \u2019b \u2019(a b c)) (/ 3 0)) =\u21d2(b c) 4.2.2. Binding constructs The three binding constructs let,let* , andletrec give Scheme a block structure, like Algol 60. The syntax of the three constructs is identical, but they di\ufb00er in the regions they establish for their variable bindings. In a letex- pression, the initial values are computed before any of the variables become bound; in a let* expression, the bind- ings and evaluations are performed sequentially; while in a letrec expressio"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 45568
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "n, all the bindings are in e\ufb00ect while theirinitial values are being computed, thus allowing mutually recursive de\ufb01nitions. (let\u27e8bindings\u27e9 \u27e8body\u27e9) library syntax Syntax:\u27e8Bindings\u27e9should have the form ((\u27e8variable 1\u27e9 \u27e8init1\u27e9)...), where each\u27e8init\u27e9is an expression, and \u27e8body\u27e9should be a sequence of one or more expressions. It is an error for a \u27e8variable\u27e9to appear more than once in the list of variables being bound. Semantics: The\u27e8init\u27e9s are evaluated in the current envi- ronment (in some unspeci\ufb01ed order), the"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 46080
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " \u27e8variable\u27e9s are bound to fresh locations holding the results, the \u27e8body\u27e9is evaluated in the extended environment, and the value(s) of the last expression of \u27e8body\u27e9is(are) returned. Each bind- ing of a\u27e8variable\u27e9has\u27e8body\u27e9as its region. (let ((x 2) (y 3)) (* x y)) =\u21d26 (let ((x 2) (y 3)) (let ((x 7) (z (+ x y))) (* z x))) =\u21d235 See also named let, section 4.2.4 . (let*\u27e8bindings\u27e9 \u27e8body\u27e9) library syntax Syntax:\u27e8Bindings\u27e9should have the form ((\u27e8variable 1\u27e9 \u27e8init1\u27e9)...), and\u27e8body\u27e9should be a sequence of one or more"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 46592
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " expres- sions. Semantics: Let* is similar to let, but the bindings are performed sequentially from left to right, and the region of a binding indicated by (\u27e8variable\u27e9 \u27e8init\u27e9)is that part of thelet* expression to the right of the binding. Thus the second binding is done in an environment in which the \ufb01rst binding is visible, and so on. (let ((x 2) (y 3)) (let* ((x 7) (z (+ x y))) (* z x))) =\u21d270 (letrec\u27e8bindings\u27e9 \u27e8body\u27e9) library syntax Syntax:\u27e8Bindings\u27e9should have the form ((\u27e8variable 1\u27e9 \u27e8init1\u27e9)...), and\u27e8bo"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 47104
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "dy\u27e9should be a sequence of one or more expres- sions. It is an error for a \u27e8variable\u27e9to appear more than once in the list of variables being bound. Semantics: The\u27e8variable\u27e9s are bound to fresh locations holding unde\ufb01ned values, the \u27e8init\u27e9s are evaluated in the12 Revised5Scheme resulting environment (in some unspeci\ufb01ed order), each \u27e8variable\u27e9is assigned to the result of the corresponding \u27e8init\u27e9, the\u27e8body\u27e9is evaluated in the resulting environment, and the value(s) of the last expression in \u27e8body\u27e9is(are) re- t"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 47616
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "urned. Each binding of a \u27e8variable\u27e9has the entire letrec expression as its region, making it possible to de\ufb01ne mutu- ally recursive procedures. (letrec ((even? (lambda (n) (if (zero? n) #t (odd? (- n 1))))) (odd? (lambda (n) (if (zero? n) #f (even? (- n 1)))))) (even? 88)) =\u21d2#t One restriction on letrec is very important: it must be possible to evaluate each \u27e8init\u27e9without assigning or refer- ring to the value of any \u27e8variable\u27e9. If this restriction is violated, then it is an error. The restriction is necessa"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 48128
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ry because Scheme passes arguments by value rather than by name. In the most common uses of letrec , all the\u27e8init\u27e9s arelambda expressions and the restriction is satis\ufb01ed au- tomatically. 4.2.3. Sequencing (begin\u27e8expression 1\u27e9 \u27e8expression 2\u27e9...)library syntax The\u27e8expression\u27e9s are evaluated sequentially from left to right, and the value(s) of the last \u27e8expression\u27e9is(are) re- turned. This expression type is used to sequence side ef- fects such as input and output. (define x 0) (begin (set! x 5) (+ x 1)) =\u21d26 (b"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 48640
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "egin (display \"4 plus 1 equals \") (display (+ 4 1))) =\u21d2 unspeci\ufb01ed and prints 4 plus 1 equals 5 4.2.4. Iteration (do ((\u27e8variable 1\u27e9 \u27e8init1\u27e9 \u27e8step 1\u27e9) library syntax ...) (\u27e8test\u27e9 \u27e8expression\u27e9...) \u27e8command\u27e9...) Dois an iteration construct. It speci\ufb01es a set of variables to be bound, how they are to be initialized at the start, and how they are to be updated on each iteration. When atermination condition is met, the loop exits after evaluating the\u27e8expression\u27e9s. Doexpressions are evaluated as follows: The \u27e8init"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 49152
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "\u27e9ex- pressions are evaluated (in some unspeci\ufb01ed order), the \u27e8variable\u27e9s are bound to fresh locations, the results of the\u27e8init\u27e9expressions are stored in the bindings of the \u27e8variable\u27e9s, and then the iteration phase begins. Each iteration begins by evaluating \u27e8test\u27e9; if the result is false (see section 6.3.1 ), then the\u27e8command\u27e9expressions are evaluated in order for e\ufb00ect, the \u27e8step\u27e9expressions are evaluated in some unspeci\ufb01ed order, the \u27e8variable\u27e9s are bound to fresh locations, the results of the \u27e8step\u27e9s ar"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 49664
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "e stored in the bindings of the \u27e8variable\u27e9s, and the next iter- ation begins. If\u27e8test\u27e9evaluates to a true value, then the \u27e8expression\u27e9s are evaluated from left to right and the value(s) of the last\u27e8expression\u27e9is(are) returned. If no \u27e8expression\u27e9s are present, then the value of the doexpression is unspeci\ufb01ed. The region of the binding of a \u27e8variable\u27e9consists of the entiredoexpression except for the \u27e8init\u27e9s. It is an error for a\u27e8variable\u27e9to appear more than once in the list of do variables. A\u27e8step\u27e9may be omit"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 50176
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ted, in which case the e\ufb00ect is the same as if (\u27e8variable\u27e9 \u27e8init\u27e9 \u27e8variable\u27e9)had been written instead of (\u27e8variable\u27e9 \u27e8init\u27e9). (do ((vec (make-vector 5)) (i 0 (+ i 1))) ((= i 5) vec) (vector-set! vec i i)) =\u21d2#(0 1 2 3 4) (let ((x \u2019(1 3 5 7 9))) (do ((x x (cdr x)) (sum 0 (+ sum (car x)))) ((null? x) sum))) =\u21d225 (let\u27e8variable\u27e9 \u27e8bindings\u27e9 \u27e8body\u27e9) library syntax \u201cNamedlet\u201d is a variant on the syntax of letwhich pro- vides a more general looping construct than doand may also be used to express recursions. It has "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 50688
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "the same syn- tax and semantics as ordinary letexcept that\u27e8variable\u27e9 is bound within\u27e8body\u27e9to a procedure whose formal argu- ments are the bound variables and whose body is \u27e8body\u27e9. Thus the execution of \u27e8body\u27e9may be repeated by invoking the procedure named by \u27e8variable\u27e9. (let loop ((numbers \u2019(3 -2 1 6 -5)) (nonneg \u2019()) (neg \u2019())) (cond ((null? numbers) (list nonneg neg)) ((>= (car numbers) 0) (loop (cdr numbers) (cons (car numbers) nonneg) neg)) ((< (car numbers) 0)4. Expressions 13 (loop (cdr numbers) nonne"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 51200
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "g (cons (car numbers) neg))))) =\u21d2((6 1 3) (-5 -2)) 4.2.5. Delayed evaluation (delay\u27e8expression\u27e9) library syntax Thedelay construct is used together with the proce- dureforce to implement lazy evaluation orcall by need . (delay\u27e8expression\u27e9)returns an object called a promise which at some point in the future may be asked (by the force procedure) to evaluate \u27e8expression\u27e9, and deliver the resulting value. The e\ufb00ect of \u27e8expression\u27e9returning multi- ple values is unspeci\ufb01ed. See the description of force (section 6"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 51712
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": ".4) for a more com- plete description of delay . 4.2.6. Quasiquotation (quasiquote\u27e8qq template\u27e9) syntax `\u27e8qq template\u27e9 syntax \u201cBackquote\u201d or \u201cquasiquote\u201d expressions are useful for constructing a list or vector structure when most but not all of the desired structure is known in advance. If no commas appear within the \u27e8qq template\u27e9, the result of evaluating `\u27e8qq template\u27e9is equivalent to the result of evaluating \u2019\u27e8qq template\u27e9. If a comma appears within the\u27e8qq template\u27e9, however, the expression following th"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 52224
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "e comma is evaluated (\u201cunquoted\u201d) and its result is inserted into the structure instead of the comma and the expres- sion. If a comma appears followed immediately by an at- sign (@), then the following expression must evaluate to a list; the opening and closing parentheses of the list are then \u201cstripped away\u201d and the elements of the list are in- serted in place of the comma at-sign expression sequence. A comma at-sign should only appear within a list or vector \u27e8qq template\u27e9. `(list ,(+ 1 2) 4) =\u21d2(list 3 4) "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 52736
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "(let ((name \u2019a)) `(list ,name \u2019,name)) =\u21d2(list a (quote a)) `(a ,(+ 1 2) ,@(map abs \u2019(4 -5 6)) b) =\u21d2(a 3 4 5 6 b) `(( foo ,(- 10 3)) ,@(cdr \u2019(c)) . ,(car \u2019(cons))) =\u21d2((foo 7) . cons) `#(10 5 ,(sqrt 4) ,@(map sqrt \u2019(16 9)) 8) =\u21d2#(10 5 2 4 3 8) Quasiquote forms may be nested. Substitutions are made only for unquoted components appearing at the same nest- ing level as the outermost backquote. The nesting level in- creases by one inside each successive quasiquotation, and decreases by one inside each unquotatio"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 53248
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "n.`(a `(b ,(+ 1 2) ,(foo ,(+ 1 3) d) e) f) =\u21d2(a `(b ,(+ 1 2) ,(foo 4 d) e) f) (let ((name1 \u2019x) (name2 \u2019y)) `(a `(b ,,name1 ,\u2019,name2 d) e)) =\u21d2(a `(b ,x ,\u2019y d) e) The two notations `\u27e8qq template\u27e9and(quasiquote \u27e8qq template\u27e9)are identical in all respects. ,\u27e8expression\u27e9 is identical to (unquote\u27e8expression\u27e9), and,@\u27e8expression\u27e9 is identical to (unquote-splicing \u27e8expression\u27e9). The ex- ternal syntax generated by write for two-element lists whose car is one of these symbols may vary between im- plementations. (quasi"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 53760
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "quote (list (unquote (+ 1 2)) 4)) =\u21d2(list 3 4) \u2019(quasiquote (list (unquote (+ 1 2)) 4)) =\u21d2`(list ,(+ 1 2) 4) i.e.,(quasiquote (list (unquote (+ 1 2)) 4)) Unpredictable behavior can result if any of the symbols quasiquote ,unquote , orunquote-splicing appear in po- sitions within a\u27e8qq template\u27e9otherwise than as described above. 4.3. Macros Scheme programs can de\ufb01ne and use new derived expres- sion types, called macros . Program-de\ufb01ned expression types have the syntax (\u27e8keyword\u27e9 \u27e8datum\u27e9...) where\u27e8keyword\u27e9is a"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 54272
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "n identi\ufb01er that uniquely determines the expression type. This identi\ufb01er is called the syntactic keyword , or simply keyword , of the macro. The number of the\u27e8datum\u27e9s, and their syntax, depends on the expression type. Each instance of a macro is called a useof the macro. The set of rules that speci\ufb01es how a use of a macro is transcribed into a more primitive expression is called the transformer of the macro. The macro de\ufb01nition facility consists of two parts: \u2022A set of expressions used to establish that cer"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 54784
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "tain iden- ti\ufb01ers are macro keywords, associate them with macro transformers, and control the scope within which a macro is de\ufb01ned, and \u2022a pattern language for specifying macro transformers. The syntactic keyword of a macro may shadow variable bindings, and local variable bindings may shadow keyword bindings. All macros de\ufb01ned using the pattern language are \u201chygienic\u201d and \u201creferentially transparent\u201d and thus preserve Scheme\u2019s lexical scoping [ 14,15,2,7,9]:14 Revised5Scheme \u2022If a macro transformer inserts a"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 55296
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " binding for an identi- \ufb01er (variable or keyword), the identi\ufb01er will in e\ufb00ect be renamed throughout its scope to avoid con\ufb02icts with other identi\ufb01ers. Note that a define at top level may or may not introduce a binding; see section 5.2. \u2022If a macro transformer inserts a free reference to an identi\ufb01er, the reference refers to the binding that was visible where the transformer was speci\ufb01ed, regardless of any local bindings that may surround the use of the macro. 4.3.1. Binding constructs for syntactic keyword"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 55808
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "s Let-syntax andletrec-syntax are analogous to letand letrec , but they bind syntactic keywords to macro trans- formers instead of binding variables to locations that con- tain values. Syntactic keywords may also be bound at top level; see section 5.3. (let-syntax\u27e8bindings\u27e9 \u27e8body\u27e9) syntax Syntax:\u27e8Bindings\u27e9should have the form ((\u27e8keyword\u27e9 \u27e8transformer spec\u27e9)...) Each\u27e8keyword\u27e9is an identi\ufb01er, each \u27e8transformer spec\u27e9 is an instance of syntax-rules , and\u27e8body\u27e9should be a sequence of one or more expressions. It "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 56320
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "is an error for a \u27e8keyword\u27e9to appear more than once in the list of keywords being bound. Semantics: The\u27e8body\u27e9is expanded in the syntactic envi- ronment obtained by extending the syntactic environment of thelet-syntax expression with macros whose keywords are the\u27e8keyword\u27e9s, bound to the speci\ufb01ed transformers. Each binding of a \u27e8keyword\u27e9has\u27e8body\u27e9as its region. (let-syntax ((when (syntax-rules () ((when test stmt1 stmt2 ...) (if test (begin stmt1 stmt2 ...)))))) (let ((if #t)) (when if (set! if \u2019now)) if)) =\u21d2n"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 56832
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ow (let ((x \u2019outer)) (let-syntax ((m (syntax-rules () ((m) x)))) (let ((x \u2019inner)) (m)))) =\u21d2outer (letrec-syntax \u27e8bindings\u27e9 \u27e8body\u27e9) syntax Syntax: Same as for let-syntax . Semantics: The\u27e8body\u27e9is expanded in the syntactic envi- ronment obtained by extending the syntactic environmentof theletrec-syntax expression with macros whose key- words are the\u27e8keyword\u27e9s, bound to the speci\ufb01ed trans- formers. Each binding of a \u27e8keyword\u27e9has the\u27e8bindings\u27e9 as well as the\u27e8body\u27e9within its region, so the transformers can trans"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 57344
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "cribe expressions into uses of the macros intro- duced by the letrec-syntax expression. (letrec-syntax ((my-or (syntax-rules () ((my-or) #f) ((my-or e) e) ((my-or e1 e2 ...) (let ((temp e1)) (if temp temp (my-or e2 ...))))))) (let ((x #f) (y 7) (temp 8) (let odd?) (if even?)) (my-or x (let temp) (if y) y))) =\u21d27 4.3.2. Pattern language A\u27e8transformer spec\u27e9has the following form: (syntax-rules\u27e8literals\u27e9 \u27e8syntax rule\u27e9...) Syntax:\u27e8Literals\u27e9is a list of identi\ufb01ers and each \u27e8syntax rule\u27e9should be of the form (\u27e8pat"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 57856
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "tern\u27e9 \u27e8template\u27e9) The\u27e8pattern\u27e9in a\u27e8syntax rule\u27e9is a list\u27e8pattern\u27e9that begins with the keyword for the macro. A\u27e8pattern\u27e9is either an identi\ufb01er, a constant, or one of the following (\u27e8pattern\u27e9...) (\u27e8pattern\u27e9 \u27e8pattern\u27e9... .\u27e8pattern\u27e9) (\u27e8pattern\u27e9...\u27e8pattern\u27e9 \u27e8ellipsis\u27e9) #(\u27e8pattern\u27e9...) #(\u27e8pattern\u27e9...\u27e8pattern\u27e9 \u27e8ellipsis\u27e9) and a template is either an identi\ufb01er, a constant, or one of the following (\u27e8element\u27e9...) (\u27e8element\u27e9 \u27e8element\u27e9... .\u27e8template\u27e9) #(\u27e8element\u27e9...) where an\u27e8element\u27e9is a\u27e8template\u27e9optionally followed b"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 58368
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "y an\u27e8ellipsis\u27e9and an\u27e8ellipsis\u27e9is the identi\ufb01er \u201c ...\u201d (which cannot be used as an identi\ufb01er in either a template or a pattern). Semantics: An instance of syntax-rules produces a new macro transformer by specifying a sequence of hygienic4. Expressions 15 rewrite rules. A use of a macro whose keyword is associated with a transformer speci\ufb01ed by syntax-rules is matched against the patterns contained in the \u27e8syntax rule\u27e9s, be- ginning with the leftmost \u27e8syntax rule\u27e9. When a match is found, the macro use is tran"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 58880
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "scribed hygienically according to the template. An identi\ufb01er that appears in the pattern of a \u27e8syntax rule\u27e9 is a pattern variable , unless it is the keyword that begins the pattern, is listed in \u27e8literals\u27e9, or is the identi\ufb01er \u201c ...\u201d. Pattern variables match arbitrary input elements and are used to refer to elements of the input in the template. It is an error for the same pattern variable to appear more than once in a\u27e8pattern\u27e9. The keyword at the beginning of the pattern in a \u27e8syntax rule\u27e9is not involved i"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 59392
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "n the matching and is not considered a pattern variable or literal identi\ufb01er. Rationale: The scope of the keyword is determined by the expression or syntax de\ufb01nition that binds it to the associated macro transformer. If the keyword were a pattern variable or literal identi\ufb01er, then the template that follows the pattern would be within its scope regardless of whether the keyword were bound by let-syntax or byletrec-syntax . Identi\ufb01ers that appear in \u27e8literals\u27e9are interpreted as literal identi\ufb01ers to be match"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 59904
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ed against corresponding subforms of the input. A subform in the input matches a literal identi\ufb01er if and only if it is an identi\ufb01er and either both its occurrence in the macro expression and its occurrence in the macro de\ufb01nition have the same lexical binding, or the two identi\ufb01ers are equal and both have no lexical binding. A subpattern followed by ...can match zero or more el- ements of the input. It is an error for ...to appear in \u27e8literals\u27e9. Within a pattern the identi\ufb01er ...must follow the last element"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 60416
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " of a nonempty sequence of subpatterns. More formally, an input form Fmatches a pattern Pif and only if: \u2022Pis a non-literal identi\ufb01er; or \u2022Pis a literal identi\ufb01er and Fis an identi\ufb01er with the same binding; or \u2022Pis a list(P1... Pn)andFis a list ofnforms that matchP1throughPn, respectively; or \u2022Pis an improper list (P1P2... Pn.Pn+1)and Fis a list or improper list of nor more forms that matchP1throughPn, respectively, and whose nth \u201ccdr\u201d matches Pn+1; or \u2022Pis of the form (P1... PnPn+1\u27e8ellipsis\u27e9)where \u27e8ellipsi"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 60928
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "s\u27e9is the identi\ufb01er ...andFis a proper list of at least nforms, the \ufb01rst nof which match P1 throughPn, respectively, and each remaining element ofFmatchesPn+1; or\u2022Pis a vector of the form #(P1... Pn)andFis a vector ofnforms that match P1throughPn; or \u2022Pis of the form #(P1... PnPn+1\u27e8ellipsis\u27e9)where \u27e8ellipsis\u27e9is the identi\ufb01er ...andFis a vector of nor more forms the \ufb01rst nof which match P1throughPn, respectively, and each remaining element of Fmatches Pn+1; or \u2022Pis a datum and Fis equal to Pin the sense of the"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 61440
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " equal? procedure. It is an error to use a macro keyword, within the scope of its binding, in an expression that does not match any of the patterns. When a macro use is transcribed according to the template of the matching\u27e8syntax rule\u27e9, pattern variables that occur in the template are replaced by the subforms they match in the input. Pattern variables that occur in subpatterns followed by one or more instances of the identi\ufb01er ...are allowed only in subtemplates that are followed by as many instances of ..."}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 61952
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": ". They are replaced in the output by all of the subforms they match in the input, distributed as indicated. It is an error if the output cannot be built up as speci\ufb01ed. Identi\ufb01ers that appear in the template but are not pattern variables or the identi\ufb01er ...are inserted into the output as literal identi\ufb01ers. If a literal identi\ufb01er is inserted as a free identi\ufb01er then it refers to the binding of that identi\ufb01er within whose scope the instance of syntax-rules appears. If a literal identi\ufb01er is inserted as a bo"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 62464
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "und identi\ufb01er then it is in e\ufb00ect renamed to prevent inadvertent captures of free identi\ufb01ers. As an example, if letandcond are de\ufb01ned as in section 7.3 then they are hygienic (as required) and the following is not an error. (let ((=> #f)) (cond (#t => \u2019ok))) =\u21d2ok The macro transformer for cond recognizes =>as a local variable, and hence an expression, and not as the top-level identi\ufb01er =>, which the macro transformer treats as a syn- tactic keyword. Thus the example expands into (let ((=> #f)) (if #t (begin"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 62976
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " => \u2019ok))) instead of (let ((=> #f)) (let ((temp #t)) (if temp (\u2019ok temp)))) which would result in an invalid procedure call.16 Revised5Scheme 5. Program structure 5.1. Programs A Scheme program consists of a sequence of expressions, de\ufb01nitions, and syntax de\ufb01nitions. Expressions are de- scribed in chapter 4; de\ufb01nitions and syntax de\ufb01nitions are the subject of the rest of the present chapter. Programs are typically stored in \ufb01les or entered inter- actively to a running Scheme system, although other paradigm"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 63488
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "s are possible; questions of user interface lie out- side the scope of this report. (Indeed, Scheme would still be useful as a notation for expressing computational methods even in the absence of a mechanical implementation.) De\ufb01nitions and syntax de\ufb01nitions occurring at the top level of a program can be interpreted declaratively. They cause bindings to be created in the top level environment or mod- ify the value of existing top-level bindings. Expressions occurring at the top level of a program are interp"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 64000
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "reted im- peratively; they are executed in order when the program is invoked or loaded, and typically perform some kind of initialization. At the top level of a program (begin\u27e8form 1\u27e9...)is equivalent to the sequence of expressions, de\ufb01nitions, and syntax de\ufb01nitions that form the body of the begin . 5.2. De\ufb01nitions De\ufb01nitions are valid in some, but not all, contexts where expressions are allowed. They are valid only at the top level of a\u27e8program\u27e9and at the beginning of a \u27e8body\u27e9. A de\ufb01nition should have one "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 64512
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "of the following forms: \u2022(define\u27e8variable\u27e9 \u27e8expression\u27e9) \u2022(define (\u27e8variable\u27e9 \u27e8formals\u27e9)\u27e8body\u27e9) \u27e8Formals\u27e9should be either a sequence of zero or more variables, or a sequence of one or more variables fol- lowed by a space-delimited period and another vari- able (as in a lambda expression). This form is equiv- alent to (define\u27e8variable\u27e9 (lambda (\u27e8formals\u27e9)\u27e8body\u27e9)). \u2022(define (\u27e8variable\u27e9.\u27e8formal\u27e9)\u27e8body\u27e9) \u27e8Formal\u27e9should be a single variable. This form is equivalent to (define\u27e8variable\u27e9 (lambda\u27e8formal\u27e9 \u27e8body\u27e9)).5"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 65024
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": ".2.1. Top level de\ufb01nitions At the top level of a program, a de\ufb01nition (define\u27e8variable\u27e9 \u27e8expression\u27e9) has essentially the same e\ufb00ect as the assignment expres- sion (set!\u27e8variable\u27e9 \u27e8expression\u27e9) if\u27e8variable\u27e9is bound. If\u27e8variable\u27e9is not bound, however, then the de\ufb01nition will bind \u27e8variable\u27e9to a new location before performing the assignment, whereas it would be an error to perform a set! on an unbound variable. (define add3 (lambda (x) (+ x 3))) (add3 3) =\u21d26 (define first car) (first \u2019(1 2)) =\u21d21 Some implemen"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 65536
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "tations of Scheme use an initial environ- ment in which all possible variables are bound to locations, most of which contain unde\ufb01ned values. Top level de\ufb01ni- tions in such an implementation are truly equivalent to assignments. 5.2.2. Internal de\ufb01nitions De\ufb01nitions may occur at the beginning of a \u27e8body\u27e9(that is, the body of a lambda ,let,let* ,letrec ,let-syntax , orletrec-syntax expression or that of a de\ufb01nition of an appropriate form). Such de\ufb01nitions are known as internal de\ufb01nitions as opposed to the top"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 66048
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " level de\ufb01nitions described above. The variable de\ufb01ned by an internal de\ufb01nition is local to the\u27e8body\u27e9. That is,\u27e8variable\u27e9is bound rather than assigned, and the region of the binding is the entire \u27e8body\u27e9. For example, (let ((x 5)) (define foo (lambda (y) (bar x y))) (define bar (lambda (a b) (+ (* a b) a))) (foo (+ x 3))) =\u21d245 A\u27e8body\u27e9containing internal de\ufb01nitions can always be con- verted into a completely equivalent letrec expression. For example, the letexpression in the above example is equiv- alent to ("}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 66560
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "let ((x 5)) (letrec ((foo (lambda (y) (bar x y))) (bar (lambda (a b) (+ (* a b) a)))) (foo (+ x 3)))) Just as for the equivalent letrec expression, it must be possible to evaluate each \u27e8expression\u27e9of every internal def- inition in a\u27e8body\u27e9without assigning or referring to the value of any\u27e8variable\u27e9being de\ufb01ned. Wherever an internal de\ufb01nition may occur (begin \u27e8de\ufb01nition 1\u27e9...)is equivalent to the sequence of de\ufb01ni- tions that form the body of the begin .6. Standard procedures 17 5.3. Syntax de\ufb01nitions Syntax "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 67072
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "de\ufb01nitions are valid only at the top level of a \u27e8program\u27e9. They have the following form: (define-syntax \u27e8keyword\u27e9 \u27e8transformer spec\u27e9) \u27e8Keyword\u27e9is an identi\ufb01er, and the \u27e8transformer spec\u27e9 should be an instance of syntax-rules . The top-level syn- tactic environment is extended by binding the \u27e8keyword\u27e9 to the speci\ufb01ed transformer. There is no define-syntax analogue of internal de\ufb01ni- tions. Although macros may expand into de\ufb01nitions and syntax de\ufb01nitions in any context that permits them, it is an error for a "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 67584
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "de\ufb01nition or syntax de\ufb01nition to shadow a syntactic keyword whose meaning is needed to determine whether some form in the group of forms that contains the shad- owing de\ufb01nition is in fact a de\ufb01nition, or, for internal def- initions, is needed to determine the boundary between the group and the expressions that follow the group. For ex- ample, the following are errors: (define define 3) (begin (define begin list)) (let-syntax ((foo (syntax-rules () ((foo (proc args ...) body ...) (define proc (lambda (args ."}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 68096
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "..) body ...)))))) (let ((x 3)) (foo (plus x y) (+ x y)) (define foo x) (plus foo x))) 6. Standard procedures This chapter describes Scheme\u2019s built-in procedures. The initial (or \u201ctop level\u201d) Scheme environment starts out with a number of variables bound to locations containing useful values, most of which are primitive procedures that ma- nipulate data. For example, the variable absis bound to (a location initially containing) a procedure of one argu- ment that computes the absolute value of a number, and "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 68608
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "the variable +is bound to a procedure that computes sums. Built-in procedures that can easily be written in terms of other built-in procedures are identi\ufb01ed as \u201clibrary proce- dures\u201d. A program may use a top-level de\ufb01nition to bind any vari- able. It may subsequently alter any such binding by an assignment (see 4.1.6 ). These operations do not modify the behavior of Scheme\u2019s built-in procedures. Altering anytop-level binding that has not been introduced by a de\ufb01ni- tion has an unspeci\ufb01ed e\ufb00ect on the behavi"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 69120
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "or of the built-in procedures. 6.1. Equivalence predicates Apredicate is a procedure that always returns a boolean value (#tor#f). An equivalence predicate is the compu- tational analogue of a mathematical equivalence relation (it is symmetric, re\ufb02exive, and transitive). Of the equiva- lence predicates described in this section, eq?is the \ufb01nest or most discriminating, and equal? is the coarsest. Eqv? is slightly less discriminating than eq?. (eqv? obj1obj2) procedure Theeqv? procedure de\ufb01nes a useful equiva"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 69632
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "lence relation on objects. Brie\ufb02y, it returns #tifobj1and obj2should normally be regarded as the same object. This relation is left slightly open to interpretation, but the following par- tial speci\ufb01cation of eqv? holds for all implementations of Scheme. Theeqv? procedure returns #tif: \u2022obj1and obj2are both #tor both#f. \u2022obj1and obj2are both symbols and (string=? (symbol->string obj1) (symbol->string obj2)) =\u21d2#t Note: This assumes that neither obj1norobj2is an \u201cun- interned symbol\u201d as alluded to in section "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 70144
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "6.3.3 . This re- port does not presume to specify the behavior of eqv? on implementation-dependent extensions. \u2022obj1andobj2are both numbers, are numerically equal (see=, section 6.2), and are either both exact or both inexact. \u2022obj1and obj2are both characters and are the same character according to the char=? procedure (sec- tion6.3.4 ). \u2022both obj1and obj2are the empty list. \u2022obj1andobj2are pairs, vectors, or strings that denote the same locations in the store (section 3.4). \u2022obj1and obj2are procedures whos"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 70656
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "e location tags are equal (section 4.1.4 ). Theeqv? procedure returns #fif: \u2022obj1and obj2are of di\ufb00erent types (section 3.2).18 Revised5Scheme \u2022one of obj1and obj2is#tbut the other is #f. \u2022obj1and obj2are symbols but (string=? (symbol->string obj1) (symbol->string obj2)) =\u21d2#f \u2022one of obj1and obj2is an exact number but the other is an inexact number. \u2022obj1and obj2are numbers for which the =procedure returns#f. \u2022obj1andobj2are characters for which the char=? pro- cedure returns #f. \u2022one of obj1and obj2is the "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 71168
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "empty list but the other is not. \u2022obj1andobj2are pairs, vectors, or strings that denote distinct locations. \u2022obj1andobj2are procedures that would behave di\ufb00er- ently (return di\ufb00erent value(s) or have di\ufb00erent side e\ufb00ects) for some arguments. (eqv? \u2019a \u2019a) =\u21d2#t (eqv? \u2019a \u2019b) =\u21d2#f (eqv? 2 2) =\u21d2#t (eqv? \u2019() \u2019()) =\u21d2#t (eqv? 100000000 100000000) =\u21d2#t (eqv? (cons 1 2) (cons 1 2)) =\u21d2#f (eqv? (lambda () 1) (lambda () 2)) =\u21d2#f (eqv? #f \u2019nil) =\u21d2#f (let ((p (lambda (x) x))) (eqv? p p)) =\u21d2#t The following examples illust"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 71680
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "rate cases in which the above rules do not fully specify the behavior of eqv? . All that can be said about such cases is that the value returned by eqv? must be a boolean. (eqv? \"\" \"\") =\u21d2 unspeci\ufb01ed (eqv? \u2019#() \u2019#()) =\u21d2 unspeci\ufb01ed (eqv? (lambda (x) x) (lambda (x) x)) =\u21d2 unspeci\ufb01ed (eqv? (lambda (x) x) (lambda (y) y)) =\u21d2 unspeci\ufb01ed The next set of examples shows the use of eqv? with pro- cedures that have local state. Gen-counter must return a distinct procedure every time, since each procedure has its own in"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 72192
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ternal counter. Gen-loser , however, returns equiv- alent procedures each time, since the local state does not a\ufb00ect the value or side e\ufb00ects of the procedures.(define gen-counter (lambda () (let ((n 0)) (lambda () (set! n (+ n 1)) n)))) (let ((g (gen-counter))) (eqv? g g)) =\u21d2#t (eqv? (gen-counter) (gen-counter)) =\u21d2#f (define gen-loser (lambda () (let ((n 0)) (lambda () (set! n (+ n 1)) 27)))) (let ((g (gen-loser))) (eqv? g g)) =\u21d2#t (eqv? (gen-loser) (gen-loser)) =\u21d2 unspeci\ufb01ed (letrec ((f (lambda () (if (eq"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 72704
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "v? f g) \u2019both \u2019f))) (g (lambda () (if (eqv? f g) \u2019both \u2019g)))) (eqv? f g)) =\u21d2 unspeci\ufb01ed (letrec ((f (lambda () (if (eqv? f g) \u2019f \u2019both))) (g (lambda () (if (eqv? f g) \u2019g \u2019both)))) (eqv? f g)) =\u21d2#f Since it is an error to modify constant objects (those re- turned by literal expressions), implementations are per- mitted, though not required, to share structure between constants where appropriate. Thus the value of eqv? on constants is sometimes implementation-dependent. (eqv? \u2019(a) \u2019(a)) =\u21d2 unspeci\ufb01ed (eqv? \"a"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 73216
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "\" \"a\") =\u21d2 unspeci\ufb01ed (eqv? \u2019(b) (cdr \u2019(a b))) =\u21d2 unspeci\ufb01ed (let ((x \u2019(a))) (eqv? x x)) =\u21d2#t Rationale: The above de\ufb01nition of eqv? allows implementa- tions latitude in their treatment of procedures and literals: im- plementations are free either to detect or to fail to detect that two procedures or two literals are equivalent to each other, and can decide whether or not to merge representations of equivalent objects by using the same pointer or bit pattern to represent both. (eq? obj1obj2) procedure Eq?is "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 73728
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "similar to eqv? except that in some cases it is capable of discerning distinctions \ufb01ner than those detectable by eqv? . Eq?andeqv? are guaranteed to have the same behavior on symbols, booleans, the empty list, pairs, procedures, and non-empty strings and vectors. Eq?\u2019s behavior on numbers and characters is implementation-dependent, but it will al- ways return either true or false, and will return true only wheneqv? would also return true. Eq?may also behave di\ufb00erently from eqv? on empty vectors and empty st"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 74240
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "rings.6. Standard procedures 19 (eq? \u2019a \u2019a) =\u21d2#t (eq? \u2019(a) \u2019(a)) =\u21d2 unspeci\ufb01ed (eq? (list \u2019a) (list \u2019a)) =\u21d2#f (eq? \"a\" \"a\") =\u21d2 unspeci\ufb01ed (eq? \"\" \"\") =\u21d2 unspeci\ufb01ed (eq? \u2019() \u2019()) =\u21d2#t (eq? 2 2) =\u21d2 unspeci\ufb01ed (eq? #\\A #\\A) =\u21d2 unspeci\ufb01ed (eq? car car) =\u21d2#t (let ((n (+ 2 3))) (eq? n n)) =\u21d2 unspeci\ufb01ed (let ((x \u2019(a))) (eq? x x)) =\u21d2#t (let ((x \u2019#())) (eq? x x)) =\u21d2#t (let ((p (lambda (x) x))) (eq? p p)) =\u21d2#t Rationale: It will usually be possible to implement eq?much more e\ufb03ciently than eqv?, for example, as a simp"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 74752
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "le pointer com- parison instead of as some more complicated operation. One reason is that it may not be possible to compute eqv? of two numbers in constant time, whereas eq?implemented as pointer comparison will always \ufb01nish in constant time. Eq?may be used likeeqv? in applications using procedures to implement objects with state since it obeys the same constraints as eqv?. (equal? obj1obj2) library procedure Equal? recursively compares the contents of pairs, vectors, and strings, applying eqv? on other obj"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 75264
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ects such as num- bers and symbols. A rule of thumb is that objects are generally equal? if they print the same. Equal? may fail to terminate if its arguments are circular data structures. (equal? \u2019a \u2019a) =\u21d2#t (equal? \u2019(a) \u2019(a)) =\u21d2#t (equal? \u2019(a (b) c) \u2019(a (b) c)) =\u21d2#t (equal? \"abc\" \"abc\") =\u21d2#t (equal? 2 2) =\u21d2#t (equal? (make-vector 5 \u2019a) (make-vector 5 \u2019a)) =\u21d2#t (equal? (lambda (x) x) (lambda (y) y)) =\u21d2 unspeci\ufb01ed 6.2. Numbers Numerical computation has traditionally been neglected by the Lisp community. Unt"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 75776
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "il Common Lisp there was no carefully thought out strategy for organizing numerical computation, and with the exception of the MacLisp sys- tem [20] little e\ufb00ort was made to execute numerical code e\ufb03ciently. This report recognizes the excellent work of the Common Lisp committee and accepts many of their rec- ommendations. In some ways this report simpli\ufb01es and generalizes their proposals in a manner consistent with the purposes of Scheme.It is important to distinguish between the mathemati- cal numbers, the"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 76288
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " Scheme numbers that attempt to model them, the machine representations used to implement the Scheme numbers, and notations used to write numbers. This report uses the types number ,complex ,real,rational , and integer to refer to both mathematical numbers and Scheme numbers. Machine representations such as \ufb01xed point and \ufb02oating point are referred to by names such as \ufb01xnum and \ufb02onum . 6.2.1. Numerical types Mathematically, numbers may be arranged into a tower of subtypes in which each level is a subset of "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 76800
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "the level above it: number complex real rational integer For example, 3 is an integer. Therefore 3 is also a rational, a real, and a complex. The same is true of the Scheme numbers that model 3. For Scheme numbers, these types are de\ufb01ned by the predicates number? ,complex? ,real? , rational? , andinteger? . There is no simple relationship between a number\u2019s type and its representation inside a computer. Although most implementations of Scheme will o\ufb00er at least two di\ufb00erent representations of 3, these di\ufb00er"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 77312
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ent representations denote the same integer. Scheme\u2019s numerical operations treat numbers as abstract data, as independent of their representation as possible. Although an implementation of Scheme may use \ufb01xnum, \ufb02onum, and perhaps other representations for numbers, this should not be apparent to a casual programmer writing simple programs. It is necessary, however, to distinguish between numbers that are represented exactly and those that may not be. For example, indexes into data structures must be known ex"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 77824
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "actly, as must some polynomial coe\ufb03cients in a symbolic algebra system. On the other hand, the results of measure- ments are inherently inexact, and irrational numbers may be approximated by rational and therefore inexact approx- imations. In order to catch uses of inexact numbers where exact numbers are required, Scheme explicitly distinguishes exact from inexact numbers. This distinction is orthogonal to the dimension of type. 6.2.2. Exactness Scheme numbers are either exact orinexact . A number is exact "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 78336
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "if it was written as an exact constant or was derived from exact numbers using only exact operations. A number20 Revised5Scheme is inexact if it was written as an inexact constant, if it was derived using inexact ingredients, or if it was derived using inexact operations. Thus inexactness is a contagious property of a number. If two implementations produce exact results for a com- putation that did not involve inexact intermediate results, the two ultimate results will be mathematically equivalent. This is "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 78848
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "generally not true of computations involving inex- act numbers since approximate methods such as \ufb02oating point arithmetic may be used, but it is the duty of each implementation to make the result as close as practical to the mathematically ideal result. Rational operations such as +should always produce ex- act results when given exact arguments. If the operation is unable to produce an exact result, then it may either report the violation of an implementation restriction or it may silently coerce its resul"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 79360
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "t to an inexact value. See sec- tion6.2.3 . With the exception of inexact->exact , the operations de- scribed in this section must generally return inexact results when given any inexact arguments. An operation may, however, return an exact result if it can prove that the value of the result is una\ufb00ected by the inexactness of its arguments. For example, multiplication of any number by an exact zero may produce an exact zero result, even if the other argument is inexact. 6.2.3. Implementation restrictions Im"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 79872
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "plementations of Scheme are not required to implement the whole tower of subtypes given in section 6.2.1 , but they must implement a coherent subset consistent with both the purposes of the implementation and the spirit of the Scheme language. For example, an implementation in which all numbers are real may still be quite useful. Implementations may also support only a limited range of numbers of any type, subject to the requirements of this section. The supported range for exact numbers of any type may be "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 80384
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "di\ufb00erent from the supported range for inex- act numbers of that type. For example, an implementation that uses \ufb02onums to represent all its inexact real numbers may support a practically unbounded range of exact inte- gers and rationals while limiting the range of inexact reals (and therefore the range of inexact integers and rationals) to the dynamic range of the \ufb02onum format. Furthermore the gaps between the representable inexact integers and ra- tionals are likely to be very large in such an implementatio"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 80896
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "n as the limits of this range are approached. An implementation of Scheme must support exact integers throughout the range of numbers that may be used for indexes of lists, vectors, and strings or that may result from computing the length of a list, vector, or string. The length ,vector-length , andstring-length proceduresmust return an exact integer, and it is an error to use anything but an exact integer as an index. Furthermore any integer constant within the index range, if expressed by an exact integer"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 81408
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " syntax, will indeed be read as an exact integer, regardless of any implementation restrictions that may apply outside this range. Finally, the procedures listed below will always return an exact integer result provided all their arguments are exact integers and the mathematically expected result is representable as an exact integer within the implementation: + - * quotient remainder modulo max min abs numerator denominator gcd lcm floor ceiling truncate round rationalize expt Implementations are encouraged"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 81920
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": ", but not required, to sup- port exact integers and exact rationals of practically unlim- ited size and precision, and to implement the above proce- dures and the /procedure in such a way that they always return exact results when given exact arguments. If one of these procedures is unable to deliver an exact result when given exact arguments, then it may either report a vio- lation of an implementation restriction or it may silently coerce its result to an inexact number. Such a coercion may cause an error"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 82432
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " later. An implementation may use \ufb02oating point and other ap- proximate representation strategies for inexact numbers. This report recommends, but does not require, that the IEEE 32-bit and 64-bit \ufb02oating point standards be followed by implementations that use \ufb02onum representations, and that implementations using other representations should match or exceed the precision achievable using these \ufb02oat- ing point standards [ 12]. In particular, implementations that use \ufb02onum represen- tations must follow these "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 82944
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "rules: A \ufb02onum result must be represented with at least as much precision as is used to express any of the inexact arguments to that operation. It is desirable (but not required) for potentially inexact oper- ations such as sqrt , when applied to exact arguments, to produce exact answers whenever possible (for example the square root of an exact 4 ought to be an exact 2). If, how- ever, an exact number is operated upon so as to produce an inexact result (as by sqrt ), and if the result is represented as a \ufb02"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 83456
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "onum, then the most precise \ufb02onum format available must be used; but if the result is represented in some other way then the representation must have at least as much precision as the most precise \ufb02onum format available. Although Scheme allows a variety of written notations for numbers, any particular implementation may support only some of them. For example, an implementation in which all numbers are real need not support the rectangular and6. Standard procedures 21 polar notations for complex numbers. If "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 83968
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "an implementa- tion encounters an exact numerical constant that it cannot represent as an exact number, then it may either report a violation of an implementation restriction or it may silently represent the constant by an inexact number. 6.2.4. Syntax of numerical constants The syntax of the written representations for numbers is described formally in section 7.1.1 . Note that case is not signi\ufb01cant in numerical constants. A number may be written in binary, octal, decimal, or hex- adecimal by the use of a "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 84480
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "radix pre\ufb01x. The radix pre\ufb01xes are#b(binary), #o(octal),#d(decimal), and #x(hexadec- imal). With no radix pre\ufb01x, a number is assumed to be expressed in decimal. A numerical constant may be speci\ufb01ed to be either exact or inexact by a pre\ufb01x. The pre\ufb01xes are #efor exact, and #i for inexact. An exactness pre\ufb01x may appear before or after any radix pre\ufb01x that is used. If the written representation of a number has no exactness pre\ufb01x, the constant may be either inexact or exact. It is inexact if it contains a decim"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 84992
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "al point, an exponent, or a \u201c #\u201d character in the place of a digit, otherwise it is exact. In systems with inexact numbers of varying precisions it may be useful to specify the precision of a constant. For this purpose, numerical constants may be written with an exponent marker that indicates the desired precision of the inexact representation. The letters s,f,d, andlspecify the use of short ,single ,double , and long precision, respec- tively. (When fewer than four internal inexact represen- tations exist,"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 85504
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " the four size speci\ufb01cations are mapped onto those available. For example, an implementation with two internal representations may map short and single together and long and double together.) In addition, the exponent markerespeci\ufb01es the default precision for the implemen- tation. The default precision has at least as much precision asdouble , but implementations may wish to allow this de- fault to be set by the user. 3.14159265358979F0 Round to single \u2014 3.141593 0.6L0 Extend to long \u2014 .600000000000000 6.2."}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 86016
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "5. Numerical operations The reader is referred to section 1.3.3 for a summary of the naming conventions used to specify restrictions on the types of arguments to numerical routines. The examples used in this section assume that any numerical constant written using an exact notation is indeed represented as an exact number. Some examples also assume that certain numerical constants written using an inexact notation canbe represented without loss of accuracy; the inexact con- stants were chosen so that this i"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 86528
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "s likely to be true in imple- mentations that use \ufb02onums to represent inexact numbers. (number? obj) procedure (complex? obj) procedure (real? obj) procedure (rational? obj) procedure (integer? obj) procedure These numerical type predicates can be applied to any kind of argument, including non-numbers. They return #tif the object is of the named type, and otherwise they return #f. In general, if a type predicate is true of a number then all higher type predicates are also true of that number. Consequently, "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 87040
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "if a type predicate is false of a number, then all lower type predicates are also false of that number. Ifzis an inexact complex number, then (real?z)is true if and only if (zero? (imag-part z))is true. Ifxis an inexact real number, then (integer? x)is true if and only if(=x(roundx)). (complex? 3+4i) =\u21d2#t (complex? 3) =\u21d2#t (real? 3) =\u21d2#t (real? -2.5+0.0i) =\u21d2#t (real? #e1e10) =\u21d2#t (rational? 6/10) =\u21d2#t (rational? 6/3) =\u21d2#t (integer? 3+0i) =\u21d2#t (integer? 3.0) =\u21d2#t (integer? 8/4) =\u21d2#t Note: The behavior of the"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 87552
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "se type predicates on inexact num- bers is unreliable, since any inaccuracy may a\ufb00ect the result. Note: In many implementations the rational? procedure will be the same as real? , and the complex? procedure will be the same as number? , but unusual implementations may be able to represent some irrational numbers exactly or may extend the number system to support some kind of non-complex numbers. (exact?z) procedure (inexact? z) procedure These numerical predicates provide tests for the exactness of a quanti"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 88064
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ty. For any Scheme number, precisely one of these predicates is true. (=z1z2z3...) procedure (<x1x2x3...) procedure (>x1x2x3...) procedure (<=x1x2x3...) procedure (>=x1x2x3...) procedure These procedures return #tif their arguments are (respec- tively): equal, monotonically increasing, monotonically de- creasing, monotonically nondecreasing, or monotonically nonincreasing.22 Revised5Scheme These predicates are required to be transitive. Note: The traditional implementations of these predicates in Lisp-like "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 88576
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "languages are not transitive. Note: While it is not an error to compare inexact numbers using these predicates, the results may be unreliable because a small inaccuracy may a\ufb00ect the result; this is especially true of =andzero? . When in doubt, consult a numerical analyst. (zero?z) library procedure (positive? x) library procedure (negative? x) library procedure (odd?n) library procedure (even?n) library procedure These numerical predicates test a number for a particular property, returning #tor#f. See note"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 89088
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " above. (maxx1x2...) library procedure (minx1x2...) library procedure These procedures return the maximum or minimum of their arguments. (max 3 4) =\u21d24 ; exact (max 3.9 4) =\u21d24.0 ; inexact Note: If any argument is inexact, then the result will also be inexact (unless the procedure can prove that the inaccuracy is not large enough to a\ufb00ect the result, which is possible only in unusual implementations). If minormaxis used to compare numbers of mixed exactness, and the numerical value of the result cannot be rep"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 89600
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "resented as an inexact number without loss of accuracy, then the procedure may report a violation of an implementation restriction. (+z1...) procedure (*z1...) procedure These procedures return the sum or product of their argu- ments. (+ 3 4) =\u21d27 (+ 3) =\u21d23 (+) =\u21d20 (* 4) =\u21d24 (*) =\u21d21 (-z1z2) procedure (-z) procedure (-z1z2...) optional procedure (/z1z2) procedure (/z) procedure (/z1z2...) optional procedure With two or more arguments, these procedures return the di\ufb00erence or quotient of their arguments, assoc"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 90112
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "iating to the left. With one argument, however, they return the additive or multiplicative inverse of their argument.(- 3 4) =\u21d2-1 (- 3 4 5) =\u21d2-6 (- 3) =\u21d2-3 (/ 3 4 5) =\u21d23/20 (/ 3) =\u21d21/3 (abs x) library procedure Absreturns the absolute value of its argument. (abs -7) =\u21d27 (quotient n1n2) procedure (remainder n1n2) procedure (modulon1n2) procedure These procedures implement number-theoretic (integer) di- vision.n2should be non-zero. All three procedures return integers. If n1/n2is an integer: (quotient n1n2) ="}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 90624
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "\u21d2n1/n2 (remainder n1n2) =\u21d20 (modulon1n2) =\u21d20 Ifn1/n2is not an integer: (quotient n1n2) =\u21d2nq (remainder n1n2) =\u21d2nr (modulon1n2) =\u21d2nm wherenqisn1/n2rounded towards zero, 0 <|nr|<|n2|, 0<|nm|<|n2|,nrandnmdi\ufb00er from n1by a multiple of n2,nrhas the same sign as n1, andnmhas the same sign asn2. From this we can conclude that for integers n1andn2with n2not equal to 0, (=n1(+ (*n2(quotient n1n2)) (remainder n1n2))) =\u21d2#t provided all numbers involved in that computation are ex- act. (modulo 13 4) =\u21d21 (remainder 13 4"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 91136
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": ") =\u21d21 (modulo -13 4) =\u21d23 (remainder -13 4) =\u21d2-1 (modulo 13 -4) =\u21d2-3 (remainder 13 -4) =\u21d21 (modulo -13 -4) =\u21d2-1 (remainder -13 -4) =\u21d2-1 (remainder -13 -4.0) =\u21d2-1.0 ; inexact6. Standard procedures 23 (gcdn1...) library procedure (lcmn1...) library procedure These procedures return the greatest common divisor or least common multiple of their arguments. The result is always non-negative. (gcd 32 -36) =\u21d24 (gcd) =\u21d20 (lcm 32 -36) =\u21d2288 (lcm 32.0 -36) =\u21d2288.0 ; inexact (lcm) =\u21d21 (numerator q) procedure (denominato"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 91648
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "r q) procedure These procedures return the numerator or denominator of their argument; the result is computed as if the argument was represented as a fraction in lowest terms. The denom- inator is always positive. The denominator of 0 is de\ufb01ned to be 1. (numerator (/ 6 4)) =\u21d23 (denominator (/ 6 4)) =\u21d22 (denominator (exact->inexact (/ 6 4))) =\u21d22.0 (floor x) procedure (ceiling x) procedure (truncate x) procedure (round x) procedure These procedures return integers. Floor returns the largest integer not larger"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 92160
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " than x.Ceiling returns the smallest integer not smaller than x.Truncate returns the integer closest to xwhose absolute value is not larger than the absolute value of x.Round returns the closest inte- ger tox, rounding to even when xis halfway between two integers. Rationale: Round rounds to even for consistency with the de- fault rounding mode speci\ufb01ed by the IEEE \ufb02oating point stan- dard. Note: If the argument to one of these procedures is inexact, then the result will also be inexact. If an exact value i"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 92672
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "s needed, the result should be passed to the inexact->exact procedure. (floor -4.3) =\u21d2-5.0 (ceiling -4.3) =\u21d2-4.0 (truncate -4.3) =\u21d2-4.0 (round -4.3) =\u21d2-4.0 (floor 3.5) =\u21d23.0 (ceiling 3.5) =\u21d24.0 (truncate 3.5) =\u21d23.0 (round 3.5) =\u21d24.0 ; inexact (round 7/2) =\u21d24 ; exact (round 7) =\u21d27(rationalize x y) library procedure Rationalize returns the simplest rational number di\ufb00er- ing fromxby no more than y. A rational number r1is simpler than another rational number r2ifr1=p1/q1and r2=p2/q2(in lowest terms) and |p1|\u2264|"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 93184
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "p2|and|q1|\u2264|q2|. Thus 3/5 is simpler than 4 /7. Although not all rationals are comparable in this ordering (consider 2 /7 and 3/5) any interval contains a rational number that is simpler than ev- ery other rational number in that interval (the simpler 2 /5 lies between 2 /7 and 3/5). Note that 0 = 0 /1 is the sim- plest rational of all. (rationalize (inexact->exact .3) 1/10) =\u21d21/3 ; exact (rationalize .3 1/10) =\u21d2#i1/3 ; inexact (expz) procedure (logz) procedure (sinz) procedure (cosz) procedure (tanz) proce"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 93696
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "dure (asinz) procedure (acosz) procedure (atanz) procedure (atany x) procedure These procedures are part of every implementation that supports general real numbers; they compute the usual transcendental functions. Logcomputes the natural log- arithm ofz(not the base ten logarithm). Asin ,acos , andatan compute arcsine (sin\u22121), arccosine (cos\u22121), and arctangent (tan\u22121), respectively. The two-argument vari- ant ofatan computes (angle (make-rectangular x y)) (see below), even in implementations that don\u2019t supp"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 94208
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ort general complex numbers. In general, the mathematical functions log, arcsine, arc- cosine, and arctangent are multiply de\ufb01ned. The value of logzis de\ufb01ned to be the one whose imaginary part lies in the range from\u2212\u03c0(exclusive) to \u03c0(inclusive). log 0 is un- de\ufb01ned. With log de\ufb01ned this way, the values of sin\u22121z, cos\u22121z, and tan\u22121zare according to the following for- mul\u00e6: sin\u22121z=\u2212ilog(iz+\u221a 1\u2212z2) cos\u22121z=\u03c0/2\u2212sin\u22121z tan\u22121z= (log(1 +iz)\u2212log(1\u2212iz))/(2i) The above speci\ufb01cation follows [ 27], which in turn cites ["}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 94720
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " 19]; refer to these sources for more detailed discussion of branch cuts, boundary conditions, and implementation of these functions. When it is possible these procedures produce a real result from a real argument.24 Revised5Scheme (sqrtz) procedure Returns the principal square root of z. The result will have either positive real part, or zero real part and non-negative imaginary part. (exptz1z2) procedure Returnsz1raised to the power z2. Forz1\u0338= 0 z1z2=ez2logz1 0zis 1 ifz= 0 and 0 otherwise. (make-rectangu"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 95232
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "lar x1x2) procedure (make-polar x3x4) procedure (real-part z) procedure (imag-part z) procedure (magnitude z) procedure (anglez) procedure These procedures are part of every implementation that supports general complex numbers. Suppose x1,x2,x3, andx4are real numbers and zis a complex number such that z=x1+x2i=x3\u00b7eix4 Then (make-rectangular x1x2) =\u21d2z (make-polar x3x4) =\u21d2z (real-part z) =\u21d2x1 (imag-part z) =\u21d2x2 (magnitude z) =\u21d2 |x3| (anglez) =\u21d2xangle where\u2212\u03c0 < xangle\u2264\u03c0withxangle =x4+ 2\u03c0nfor some integern. Rat"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 95744
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ionale: Magnitude is the same as absfor a real argu- ment, but absmust be present in all implementations, whereas magnitude need only be present in implementations that sup- port general complex numbers. (exact->inexact z) procedure (inexact->exact z) procedure Exact->inexact returns an inexact representation of z. The value returned is the inexact number that is numeri- cally closest to the argument. If an exact argument has no reasonably close inexact equivalent, then a violation of an implementation rest"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 96256
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "riction may be reported. Inexact->exact returns an exact representation of z. The value returned is the exact number that is numerically clos- est to the argument. If an inexact argument has no rea- sonably close exact equivalent, then a violation of an im- plementation restriction may be reported. These procedures implement the natural one-to-one corre- spondence between exact and inexact integers throughout an implementation-dependent range. See section 6.2.3 .6.2.6. Numerical input and output (number->st"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 96768
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ring z) procedure (number->string z radix) procedure Radix must be an exact integer, either 2, 8, 10, or 16. If omitted,radix defaults to 10. The procedure number-> string takes a number and a radix and returns as a string an external representation of the given number in the given radix such that (let ((number number) (radixradix)) (eqv? number (string->number (number->string number radix) radix))) is true. It is an error if no possible result makes this ex- pression true. Ifzis inexact, the radix is 10, a"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 97280
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "nd the above expression can be satis\ufb01ed by a result that contains a decimal point, then the result contains a decimal point and is expressed using the minimum number of digits (exclusive of exponent and trailing zeroes) needed to make the above expression true [3,5]; otherwise the format of the result is unspeci\ufb01ed. The result returned by number->string never contains an explicit radix pre\ufb01x. Note: The error case can occur only when zis not a complex number or is a complex number with a non-rational real or"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 97792
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " imaginary part. Rationale: Ifzis an inexact number represented using \ufb02onums, and the radix is 10, then the above expression is normally satis- \ufb01ed by a result containing a decimal point. The unspeci\ufb01ed case allows for in\ufb01nities, NaNs, and non-\ufb02onum representations. (string->number string) procedure (string->number string radix ) procedure Returns a number of the maximally precise representation expressed by the given string .Radix must be an exact integer, either 2, 8, 10, or 16. If supplied, radix is a de"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 98304
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "fault radix that may be overridden by an explicit radix pre\ufb01x in string (e.g.\"#o177\" ). Ifradix is not supplied, then the default radix is 10. If string is not a syntactically valid notation for a number, then string->number returns#f. (string->number \"100\") =\u21d2100 (string->number \"100\" 16) =\u21d2256 (string->number \"1e2\") =\u21d2100.0 (string->number \"15##\") =\u21d21500.0 Note: The domain of string->number may be restricted by implementations in the following ways. String->number is per- mitted to return #fwheneverstring"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 98816
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " contains an explicit radix pre\ufb01x. If all numbers supported by an implementation are real,6. Standard procedures 25 thenstring->number is permitted to return #fwheneverstring uses the polar or rectangular notations for complex numbers. If all numbers are integers, then string->number may return #f whenever the fractional notation is used. If all numbers are exact, then string->number may return #fwhenever an ex- ponent marker or explicit exactness pre\ufb01x is used, or if a # appears in place of a digit. If all"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 99328
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " inexact numbers are integers, thenstring->number may return #fwhenever a decimal point is used. 6.3. Other data types This section describes operations on some of Scheme\u2019s non- numeric data types: booleans, pairs, lists, symbols, char- acters, strings and vectors. 6.3.1. Booleans The standard boolean objects for true and false are written as#tand#f. What really matters, though, are the objects that the Scheme conditional expressions ( if,cond ,and, or,do) treat as true or false. The phrase \u201ca true value\u201d ("}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 99840
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "or sometimes just \u201ctrue\u201d) means any object treated as true by the conditional expressions, and the phrase \u201ca false value\u201d (or \u201cfalse\u201d) means any object treated as false by the conditional expressions. Of all the standard Scheme values, only #fcounts as false in conditional expressions. Except for #f, all standard Scheme values, including #t, pairs, the empty list, sym- bols, numbers, strings, vectors, and procedures, count as true. Note: Programmers accustomed to other dialects of Lisp should be aware that "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 100352
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "Scheme distinguishes both #fand the empty list from the symbol nil. Boolean constants evaluate to themselves, so they do not need to be quoted in programs. #t =\u21d2#t #f =\u21d2#f \u2019#f =\u21d2#f (not obj) library procedure Notreturns#tifobjis false, and returns #fotherwise. (not #t) =\u21d2#f (not 3) =\u21d2#f (not (list 3)) =\u21d2#f (not #f) =\u21d2#t (not \u2019()) =\u21d2#f (not (list)) =\u21d2#f (not \u2019nil) =\u21d2#f(boolean? obj) library procedure Boolean? returns#tifobjis either#tor#fand returns #fotherwise. (boolean? #f) =\u21d2#t (boolean? 0) =\u21d2#f (boolean?"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 100864
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " \u2019()) =\u21d2#f 6.3.2. Pairs and lists Apair(sometimes called a dotted pair ) is a record structure with two \ufb01elds called the car and cdr \ufb01elds (for historical reasons). Pairs are created by the procedure cons . The car and cdr \ufb01elds are accessed by the procedures carand cdr. The car and cdr \ufb01elds are assigned by the procedures set-car! andset-cdr! . Pairs are used primarily to represent lists. A list can be de\ufb01ned recursively as either the empty list or a pair whose cdr is a list. More precisely, the set of lis"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 101376
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ts is de\ufb01ned as the smallest set Xsuch that \u2022The empty list is in X. \u2022Iflistis in X, then any pair whose cdr \ufb01eld contains listis also in X. The objects in the car \ufb01elds of successive pairs of a list are the elements of the list. For example, a two-element list is a pair whose car is the \ufb01rst element and whose cdr is a pair whose car is the second element and whose cdr is the empty list. The length of a list is the number of elements, which is the same as the number of pairs. The empty list is a special obj"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 101888
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ect of its own type (it is not a pair); it has no elements and its length is zero. Note: The above de\ufb01nitions imply that all lists have \ufb01nite length and are terminated by the empty list. The most general notation (external representation) for Scheme pairs is the \u201cdotted\u201d notation (c1.c2)where c1 is the value of the car \ufb01eld and c2is the value of the cdr \ufb01eld. For example (4 . 5) is a pair whose car is 4 and whose cdr is 5. Note that (4 . 5) is the external repre- sentation of a pair, not an expression that "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 102400
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "evaluates to a pair. A more streamlined notation can be used for lists: the elements of the list are simply enclosed in parentheses and separated by spaces. The empty list is written (). For example, (a b c d e) and (a . (b . (c . (d . (e . ())))))26 Revised5Scheme are equivalent notations for a list of symbols. A chain of pairs not ending in the empty list is called an improper list . Note that an improper list is not a list. The list and dotted notations can be combined to represent improper lists: (a b c"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 102912
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " . d) is equivalent to (a . (b . (c . d))) Whether a given pair is a list depends upon what is stored in the cdr \ufb01eld. When the set-cdr! procedure is used, an object can be a list one moment and not the next: (define x (list \u2019a \u2019b \u2019c)) (define y x) y =\u21d2(a b c) (list? y) =\u21d2#t (set-cdr! x 4) =\u21d2 unspeci\ufb01ed x =\u21d2(a . 4) (eqv? x y) =\u21d2#t y =\u21d2(a . 4) (list? y) =\u21d2#f (set-cdr! x x) =\u21d2 unspeci\ufb01ed (list? x) =\u21d2#f Within literal expressions and representations of ob- jects read by the read procedure, the forms \u2019\u27e8datum\u27e9, "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 103424
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "`\u27e8datum\u27e9,,\u27e8datum\u27e9, and,@\u27e8datum\u27e9denote two-ele- ment lists whose \ufb01rst elements are the symbols quote , quasiquote ,unquote , andunquote-splicing , respec- tively. The second element in each case is \u27e8datum\u27e9. This convention is supported so that arbitrary Scheme pro- grams may be represented as lists. That is, according to Scheme\u2019s grammar, every \u27e8expression\u27e9is also a\u27e8datum\u27e9 (see section 7.1.2 ). Among other things, this permits the use of the read procedure to parse Scheme programs. See section 3.3. (pair? ob"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 103936
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "j) procedure Pair? returns#tifobjis a pair, and otherwise returns #f. (pair? \u2019(a . b)) =\u21d2#t (pair? \u2019(a b c)) =\u21d2#t (pair? \u2019()) =\u21d2#f (pair? \u2019#(a b)) =\u21d2#f (cons obj1obj2) procedure Returns a newly allocated pair whose car is obj1and whose cdr is obj2. The pair is guaranteed to be di\ufb00erent (in the sense ofeqv? ) from every existing object. (cons \u2019a \u2019()) =\u21d2(a) (cons \u2019(a) \u2019(b c d)) =\u21d2((a) b c d) (cons \"a\" \u2019(b c)) =\u21d2(\"a\" b c) (cons \u2019a 3) =\u21d2(a . 3) (cons \u2019(a b) \u2019c) =\u21d2((a b) . c)(car pair) procedure Returns the cont"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 104448
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ents of the car \ufb01eld of pair. Note that it is an error to take the car of the empty list. (car \u2019(a b c)) =\u21d2a (car \u2019((a) b c d)) =\u21d2(a) (car \u2019(1 . 2)) =\u21d21 (car \u2019()) =\u21d2 error (cdr pair) procedure Returns the contents of the cdr \ufb01eld of pair. Note that it is an error to take the cdr of the empty list. (cdr \u2019((a) b c d)) =\u21d2(b c d) (cdr \u2019(1 . 2)) =\u21d22 (cdr \u2019()) =\u21d2 error (set-car! pair obj) procedure Stores objin the car \ufb01eld of pair. The value returned by set-car! is unspeci\ufb01ed. (define (f) (list \u2019not-a-constant-l"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 104960
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ist)) (define (g) \u2019(constant-list)) (set-car! (f) 3) =\u21d2 unspeci\ufb01ed (set-car! (g) 3) =\u21d2 error (set-cdr! pair obj) procedure Stores objin the cdr \ufb01eld of pair. The value returned by set-cdr! is unspeci\ufb01ed. (caar pair) library procedure (cadr pair) library procedure ...... (cdddar pair) library procedure (cddddr pair) library procedure These procedures are compositions of carandcdr, where for example caddr could be de\ufb01ned by (define caddr (lambda (x) (car (cdr (cdr x))))) . Arbitrary compositions, up to four d"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 105472
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "eep, are provided. There are twenty-eight of these procedures in all. (null? obj) library procedure Returns#tifobjis the empty list, otherwise returns #f. (list? obj) library procedure Returns#tifobjis a list, otherwise returns #f. By de\ufb01ni- tion, all lists have \ufb01nite length and are terminated by the empty list.6. Standard procedures 27 (list? \u2019(a b c)) =\u21d2#t (list? \u2019()) =\u21d2#t (list? \u2019(a . b)) =\u21d2#f (let ((x (list \u2019a))) (set-cdr! x x) (list? x)) =\u21d2#f (list obj...) library procedure Returns a newly allocated li"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 105984
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "st of its arguments. (list \u2019a (+ 3 4) \u2019c) =\u21d2(a 7 c) (list) =\u21d2() (length list) library procedure Returns the length of list. (length \u2019(a b c)) =\u21d23 (length \u2019(a (b) (c d e))) =\u21d23 (length \u2019()) =\u21d20 (append list...) library procedure Returns a list consisting of the elements of the \ufb01rst list followed by the elements of the other lists. (append \u2019(x) \u2019(y)) =\u21d2(x y) (append \u2019(a) \u2019(b c d)) =\u21d2(a b c d) (append \u2019(a (b)) \u2019((c))) =\u21d2(a (b) (c)) The resulting list is always newly allocated, except that it shares structure w"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 106496
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ith the last listargument. The last argument may actually be any object; an improper list results if the last argument is not a proper list. (append \u2019(a b) \u2019(c . d)) =\u21d2(a b c . d) (append \u2019() \u2019a) =\u21d2a (reverse list) library procedure Returns a newly allocated list consisting of the elements of listin reverse order. (reverse \u2019(a b c)) =\u21d2(c b a) (reverse \u2019(a (b c) d (e (f)))) =\u21d2((e (f)) d (b c) a) (list-tail listk) library procedure Returns the sublist of listobtained by omitting the \ufb01rst k elements. It is an "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 107008
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "error if listhas fewer than kelements. List-tail could be de\ufb01ned by (define list-tail (lambda (x k) (if (zero? k) x (list-tail (cdr x) (- k 1)))))(list-ref listk) library procedure Returns the kth element of list. (This is the same as the car of(list-tail listk).) It is an error if listhas fewer thankelements. (list-ref \u2019(a b c d) 2) =\u21d2c (list-ref \u2019(a b c d) (inexact->exact (round 1.8))) =\u21d2c (memq obj list) library procedure (memv obj list) library procedure (member obj list) library procedure These procedu"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 107520
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "res return the \ufb01rst sublist of listwhose car isobj, where the sublists of listare the non-empty lists returned by (list-tail list k)forkless than the length oflist. Ifobjdoes not occur in list, then#f(not the empty list) is returned. Memq useseq?to compare objwith the elements of list, whilememv useseqv? andmember uses equal? . (memq \u2019a \u2019(a b c)) =\u21d2(a b c) (memq \u2019b \u2019(a b c)) =\u21d2(b c) (memq \u2019a \u2019(b c d)) =\u21d2#f (memq (list \u2019a) \u2019(b (a) c)) =\u21d2#f (member (list \u2019a) \u2019(b (a) c)) =\u21d2((a) c) (memq 101 \u2019(100 101 102)) =\u21d2 "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 108032
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "unspeci\ufb01ed (memv 101 \u2019(100 101 102)) =\u21d2(101 102) (assq obj alist) library procedure (assv obj alist) library procedure (assoc obj alist) library procedure Alist (for \u201cassociation list\u201d) must be a list of pairs. These procedures \ufb01nd the \ufb01rst pair in alist whose car \ufb01eld is obj, and returns that pair. If no pair in alist hasobjas its car, then#f(not the empty list) is returned. Assq useseq?to compare objwith the car \ufb01elds of the pairs in alist, while assv useseqv? andassoc usesequal? . (define e \u2019((a 1) (b 2)"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 108544
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " (c 3))) (assq \u2019a e) =\u21d2(a 1) (assq \u2019b e) =\u21d2(b 2) (assq \u2019d e) =\u21d2#f (assq (list \u2019a) \u2019(((a)) ((b)) ((c)))) =\u21d2#f (assoc (list \u2019a) \u2019(((a)) ((b)) ((c)))) =\u21d2((a)) (assq 5 \u2019((2 3) (5 7) (11 13))) =\u21d2 unspeci\ufb01ed (assv 5 \u2019((2 3) (5 7) (11 13))) =\u21d2(5 7) Rationale: Although they are ordinarily used as predicates, memq,memv,member ,assq,assv, andassoc do not have question marks in their names because they return useful values rather than just #tor#f.28 Revised5Scheme 6.3.3. Symbols Symbols are objects whose usefulness re"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 109056
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "sts on the fact that two symbols are identical (in the sense of eqv? ) if and only if their names are spelled the same way. This is exactly the property needed to represent identi\ufb01ers in programs, and so most implementations of Scheme use them internally for that purpose. Symbols are useful for many other applica- tions; for instance, they may be used the way enumerated values are used in Pascal. The rules for writing a symbol are exactly the same as the rules for writing an identi\ufb01er; see sections 2.1and7."}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 109568
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "1.1 . It is guaranteed that any symbol that has been returned as part of a literal expression, or read using the read proce- dure, and subsequently written out using the write proce- dure, will read back in as the identical symbol (in the sense ofeqv? ). Thestring->symbol procedure, however, can create symbols for which this write/read invariance may not hold because their names contain special characters or letters in the non-standard case. Note: Some implementations of Scheme have a feature known as \u201cslas"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 110080
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "hi\ufb01cation\u201d in order to guarantee write/read invariance for all symbols, but historically the most important use of this feature has been to compensate for the lack of a string data type. Some implementations also have \u201cuninterned symbols\u201d, which defeat write/read invariance even in implementations with slashi\ufb01cation, and also generate exceptions to the rule that two symbols are the same if and only if their names are spelled the same. (symbol? obj) procedure Returns#tifobjis a symbol, otherwise returns #f. "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 110592
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "(symbol? \u2019foo) =\u21d2#t (symbol? (car \u2019(a b))) =\u21d2#t (symbol? \"bar\") =\u21d2#f (symbol? \u2019nil) =\u21d2#t (symbol? \u2019()) =\u21d2#f (symbol? #f) =\u21d2#f (symbol->string symbol) procedure Returns the name of symbol as a string. If the symbol was part of an object returned as the value of a literal expression (section 4.1.2 ) or by a call to the read proce- dure, and its name contains alphabetic characters, then the string returned will contain characters in the implementa- tion\u2019s preferred standard case\u2014some implementations will prefe"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 111104
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "r upper case, others lower case. If the symbol was re- turned by string->symbol , the case of characters in the string returned will be the same as the case in the string that was passed to string->symbol . It is an error to apply mutation procedures like string-set! to strings returned by this procedure.The following examples assume that the implementation\u2019s standard case is lower case: (symbol->string \u2019flying-fish) =\u21d2\"flying-fish\" (symbol->string \u2019Martin) =\u21d2\"martin\" (symbol->string (string->symbol \"Malvin"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 111616
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "a\")) =\u21d2\"Malvina\" (string->symbol string) procedure Returns the symbol whose name is string . This procedure can create symbols with names containing special charac- ters or letters in the non-standard case, but it is usually a bad idea to create such symbols because in some imple- mentations of Scheme they cannot be read as themselves. Seesymbol->string . The following examples assume that the implementation\u2019s standard case is lower case: (eq? \u2019mISSISSIppi \u2019mississippi) =\u21d2#t (string->symbol \"mISSISSIppi\") ="}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 112128
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "\u21d2the symbol with name \"mISSISSIppi\" (eq? \u2019bitBlt (string->symbol \"bitBlt\")) =\u21d2#f (eq? \u2019JollyWog (string->symbol (symbol->string \u2019JollyWog))) =\u21d2#t (string=? \"K. Harper, M.D.\" (symbol->string (string->symbol \"K. Harper, M.D.\"))) =\u21d2#t 6.3.4. Characters Characters are objects that represent printed characters such as letters and digits. Characters are written using the notation #\\\u27e8character\u27e9or#\\\u27e8character name\u27e9. For exam- ple: #\\a ; lower case letter #\\A ; upper case letter #\\( ; left parenthesis #\\ ; the space"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 112640
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " character #\\space ; the preferred way to write a space #\\newline ; the newline character Case is signi\ufb01cant in #\\\u27e8character\u27e9, but not in #\\\u27e8character name\u27e9. If\u27e8character\u27e9in#\\\u27e8character\u27e9is alphabetic, then the character following \u27e8character\u27e9must be a delimiter character such as a space or parenthesis. This rule resolves the ambiguous case where, for example, the sequence of6. Standard procedures 29 characters \u201c #\\space \u201d could be taken to be either a repre- sentation of the space character or a representati"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 113152
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "on of the character \u201c #\\s\u201d followed by a representation of the symbol \u201cpace .\u201d Characters written in the #\\notation are self-evaluating. That is, they do not have to be quoted in programs. Some of the procedures that operate on characters ignore the di\ufb00erence between upper case and lower case. The pro- cedures that ignore case have \u201c -ci\u201d (for \u201ccase insensitive\u201d) embedded in their names. (char? obj) procedure Returns#tifobjis a character, otherwise returns #f. (char=? char 1char 2) procedure (char<? char 1c"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 113664
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "har 2) procedure (char>? char 1char 2) procedure (char<=? char 1char 2) procedure (char>=? char 1char 2) procedure These procedures impose a total ordering on the set of characters. It is guaranteed that under this ordering: \u2022The upper case characters are in order. For example, (char<? #\\A #\\B) returns#t. \u2022The lower case characters are in order. For example, (char<? #\\a #\\b) returns#t. \u2022The digits are in order. For example, (char<? #\\0 #\\9) returns#t. \u2022Either all the digits precede all the upper case letter"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 114176
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "s, or vice versa. \u2022Either all the digits precede all the lower case letters, or vice versa. Some implementations may generalize these procedures to take more than two arguments, as with the corresponding numerical predicates. (char-ci=? char 1char 2) library procedure (char-ci<? char 1char 2) library procedure (char-ci>? char 1char 2) library procedure (char-ci<=? char 1char 2) library procedure (char-ci>=? char 1char 2) library procedure These procedures are similar to char=? et cetera, but they treat uppe"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 114688
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "r case and lower case letters as the same. For example, (char-ci=? #\\A #\\a) returns#t. Some imple- mentations may generalize these procedures to take more than two arguments, as with the corresponding numerical predicates.(char-alphabetic? char) library procedure (char-numeric? char) library procedure (char-whitespace? char) library procedure (char-upper-case? letter) library procedure (char-lower-case? letter) library procedure These procedures return #tif their arguments are alpha- betic, numeric, whitesp"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 115200
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ace, upper case, or lower case char- acters, respectively, otherwise they return #f. The follow- ing remarks, which are speci\ufb01c to the ASCII character set, are intended only as a guide: The alphabetic characters are the 52 upper and lower case letters. The numeric charac- ters are the ten decimal digits. The whitespace characters are space, tab, line feed, form feed, and carriage return. (char->integer char) procedure (integer->char n) procedure Given a character, char->integer returns an exact inte- ger re"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 115712
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "presentation of the character. Given an exact inte- ger that is the image of a character under char->integer , integer->char returns that character. These procedures implement order-preserving isomorphisms between the set of characters under the char<=? ordering and some subset of the integers under the <=ordering. That is, if (char<=?a b)=\u21d2#tand(<=x y)=\u21d2#t andxandyare in the domain of integer->char , then (<= (char->integer a) (char->integer b)) =\u21d2#t (char<=? (integer->char x) (integer->char y))=\u21d2#t (char-"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 116224
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "upcase char) library procedure (char-downcase char) library procedure These procedures return a character char 2such that (char-ci=? char char 2). In addition, if char is alpha- betic, then the result of char-upcase is upper case and the result of char-downcase is lower case. 6.3.5. Strings Strings are sequences of characters. Strings are written as sequences of characters enclosed within doublequotes (\"). A doublequote can be written inside a string only by escaping it with a backslash ( \\), as in \"The wor"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 116736
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "d \\\"recursion\\\" has many meanings.\" A backslash can be written inside a string only by escaping it with another backslash. Scheme does not specify the e\ufb00ect of a backslash within a string that is not followed by a doublequote or backslash.30 Revised5Scheme A string constant may continue from one line to the next, but the exact contents of such a string are unspeci\ufb01ed. The length of a string is the number of characters that it contains. This number is an exact, non-negative integer that is \ufb01xed when the stri"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 117248
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ng is created. The valid indexes of a string are the exact non-negative integers less than the length of the string. The \ufb01rst character of a string has index 0, the second has index 1, and so on. In phrases such as \u201cthe characters of string beginning with index start and ending with index end,\u201d it is understood that the index start is inclusive and the index endis ex- clusive. Thus if start and endare the same index, a null substring is referred to, and if start is zero and endis the length of string , then"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 117760
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " the entire string is referred to. Some of the procedures that operate on strings ignore the di\ufb00erence between upper and lower case. The versions that ignore case have \u201c -ci\u201d (for \u201ccase insensitive\u201d) embedded in their names. (string? obj) procedure Returns#tifobjis a string, otherwise returns #f. (make-string k) procedure (make-string kchar) procedure Make-string returns a newly allocated string of length k. Ifchar is given, then all elements of the string are ini- tialized to char, otherwise the contents o"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 118272
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "f the string are unspeci\ufb01ed. (string char...) library procedure Returns a newly allocated string composed of the argu- ments. (string-length string) procedure Returns the number of characters in the given string . (string-ref stringk) procedure kmust be a valid index of string .String-ref returns characterkofstring using zero-origin indexing. (string-set! string k char ) procedure kmust be a valid index of string .String-set! stores char in elementkofstring and returns an unspeci\ufb01ed value. (define (f) (make"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 118784
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "-string 3 #\\*)) (define (g) \"***\") (string-set! (f) 0 #\\?) =\u21d2 unspeci\ufb01ed (string-set! (g) 0 #\\?) =\u21d2 error (string-set! (symbol->string \u2019immutable) 0 #\\?) =\u21d2 error(string=? string 1string 2) library procedure (string-ci=? string 1string 2) library procedure Returns#tif the two strings are the same length and con- tain the same characters in the same positions, otherwise returns#f.String-ci=? treats upper and lower case let- ters as though they were the same character, but string=? treats upper and lower case"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 119296
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " as distinct characters. (string<? string 1string 2) library procedure (string>? string 1string 2) library procedure (string<=? string 1string 2) library procedure (string>=? string 1string 2) library procedure (string-ci<? string 1string 2) library procedure (string-ci>? string 1string 2) library procedure (string-ci<=? string 1string 2) library procedure (string-ci>=? string 1string 2) library procedure These procedures are the lexicographic extensions to strings of the corresponding orderings on characte"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 119808
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "rs. For example, string<? is the lexicographic ordering on strings induced by the ordering char<? on characters. If two strings di\ufb00er in length but are the same up to the length of the shorter string, the shorter string is considered to be lexicographically less than the longer string. Implementations may generalize these and the string=? andstring-ci=? procedures to take more than two argu- ments, as with the corresponding numerical predicates. (substring string start end ) library procedure String must be"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 120320
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " a string, and start and endmust be exact integers satisfying 0\u2264start\u2264end\u2264(string-length string). Substring returns a newly allocated string formed from the characters of string beginning with index start (inclu- sive) and ending with index end(exclusive). (string-append string...) library procedure Returns a newly allocated string whose characters form the concatenation of the given strings. (string->list string) library procedure (list->string list) library procedure String->list returns a newly allocated"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 120832
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " list of the charac- ters that make up the given string. List->string returns a newly allocated string formed from the characters in the listlist, which must be a list of characters. String->list andlist->string are inverses so far as equal? is con- cerned. (string-copy string) library procedure Returns a newly allocated copy of the given string .6. Standard procedures 31 (string-fill! string char ) library procedure Stores char in every element of the given string and returns an unspeci\ufb01ed value. 6.3.6. Ve"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 121344
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ctors Vectors are heterogenous structures whose elements are in- dexed by integers. A vector typically occupies less space than a list of the same length, and the average time re- quired to access a randomly chosen element is typically less for the vector than for the list. The length of a vector is the number of elements that it contains. This number is a non-negative integer that is \ufb01xed when the vector is created. The valid indexes of a vector are the exact non-negative integers less than the length of t"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 121856
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "he vector. The \ufb01rst element in a vector is indexed by zero, and the last element is indexed by one less than the length of the vector. Vectors are written using the notation #(obj...). For example, a vector of length 3 containing the number zero in element 0, the list (2 2 2 2) in element 1, and the string\"Anna\" in element 2 can be written as following: #(0 (2 2 2 2) \"Anna\") Note that this is the external representation of a vector, not an expression evaluating to a vector. Like list constants, vector const"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 122368
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ants must be quoted: \u2019#(0 (2 2 2 2) \"Anna\") =\u21d2#(0 (2 2 2 2) \"Anna\") (vector? obj) procedure Returns#tifobjis a vector, otherwise returns #f. (make-vector k) procedure (make-vector k \ufb01ll) procedure Returns a newly allocated vector of kelements. If a second argument is given, then each element is initialized to \ufb01ll. Otherwise the initial contents of each element is unspeci- \ufb01ed. (vector obj...) library procedure Returns a newly allocated vector whose elements contain the given arguments. Analogous to list . ("}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 122880
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "vector \u2019a \u2019b \u2019c) =\u21d2#(a b c) (vector-length vector) procedure Returns the number of elements in vector as an exact in- teger. (vector-ref vector k) procedure kmust be a valid index of vector .Vector-ref returns the contents of element kofvector .(vector-ref \u2019#(1 1 2 3 5 8 13 21) 5) =\u21d28 (vector-ref \u2019#(1 1 2 3 5 8 13 21) (let ((i (round (* 2 (acos -1))))) (if (inexact? i) (inexact->exact i) i))) =\u21d213 (vector-set! vector k obj ) procedure kmust be a valid index of vector .Vector-set! stores obj in elementkofvec"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 123392
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "tor . The value returned by vector-set! is unspeci\ufb01ed. (let ((vec (vector 0 \u2019(2 2 2 2) \"Anna\"))) (vector-set! vec 1 \u2019(\"Sue\" \"Sue\")) vec) =\u21d2#(0 (\"Sue\" \"Sue\") \"Anna\") (vector-set! \u2019#(0 1 2) 1 \"doe\") =\u21d2 error; constant vector (vector->list vector) library procedure (list->vector list) library procedure Vector->list returns a newly allocated list of the objects contained in the elements of vector .List->vector returns a newly created vector initialized to the elements of the list list. (vector->list \u2019#(dah dah "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 123904
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "didah)) =\u21d2(dah dah didah) (list->vector \u2019(dididit dah)) =\u21d2#(dididit dah) (vector-fill! vector \ufb01ll ) library procedure Stores \ufb01llin every element of vector . The value returned byvector-fill! is unspeci\ufb01ed. 6.4. Control features This chapter describes various primitive procedures which control the \ufb02ow of program execution in special ways. The procedure? predicate is also described here. (procedure? obj) procedure Returns#tifobjis a procedure, otherwise returns #f. (procedure? car) =\u21d2#t (procedure? \u2019car) =\u21d2#f"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 124416
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " (procedure? (lambda (x) (* x x))) =\u21d2#t (procedure? \u2019(lambda (x) (* x x))) =\u21d2#f (call-with-current-continuation procedure?) =\u21d2#t32 Revised5Scheme (apply proc arg 1...args) procedure Proc must be a procedure and args must be a list. Calls proc with the elements of the list (append (list arg1 ...)args)as the actual arguments. (apply + (list 3 4)) =\u21d27 (define compose (lambda (f g) (lambda args (f (apply g args))))) ((compose sqrt *) 12 75) =\u21d230 (map proc list 1list2...) library procedure The lists must be list"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 124928
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "s, and procmust be a procedure taking as many arguments as there are lists and returning a single value. If more than one listis given, then they must all be the same length. Mapapplies proc element-wise to the elements of the lists and returns a list of the results, in order. The dynamic order in which proc is applied to the elements of the lists is unspeci\ufb01ed. (map cadr \u2019((a b) (d e) (g h))) =\u21d2(b e h) (map (lambda (n) (expt n n)) \u2019(1 2 3 4 5)) =\u21d2(1 4 27 256 3125) (map + \u2019(1 2 3) \u2019(4 5 6)) =\u21d2(5 7 9) (let ("}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 125440
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "(count 0)) (map (lambda (ignored) (set! count (+ count 1)) count) \u2019(a b))) =\u21d2(1 2) or(2 1) (for-each proc list 1list2...) library procedure The arguments to for-each are like the arguments to map, butfor-each calls proc for its side e\ufb00ects rather than for its values. Unlike map,for-each is guaranteed to call proc on the elements of the lists in order from the \ufb01rst ele- ment(s) to the last, and the value returned by for-each is unspeci\ufb01ed. (let ((v (make-vector 5))) (for-each (lambda (i) (vector-set! v i (* "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 125952
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "i i))) \u2019(0 1 2 3 4)) v) =\u21d2#(0 1 4 9 16) (force promise) library procedure Forces the value of promise (seedelay , section 4.2.5 ). If no value has been computed for the promise, then a value iscomputed and returned. The value of the promise is cached (or \u201cmemoized\u201d) so that if it is forced a second time, the previously computed value is returned. (force (delay (+ 1 2))) =\u21d23 (let ((p (delay (+ 1 2)))) (list (force p) (force p))) =\u21d2(3 3) (define a-stream (letrec ((next (lambda (n) (cons n (delay (next (+ n 1)"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 126464
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": ")))))) (next 0))) (define head car) (define tail (lambda (stream) (force (cdr stream)))) (head (tail (tail a-stream))) =\u21d22 Force anddelay are mainly intended for programs written in functional style. The following examples should not be considered to illustrate good programming style, but they illustrate the property that only one value is computed for a promise, no matter how many times it is forced. (define count 0) (define p (delay (begin (set! count (+ count 1)) (if (> count x) count (force p))))) (defi"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 126976
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ne x 5) p =\u21d2 a promise (force p) =\u21d26 p =\u21d2 a promise, still (begin (set! x 10) (force p)) =\u21d26 Here is a possible implementation of delay andforce . Promises are implemented here as procedures of no argu- ments, and force simply calls its argument: (define force (lambda (object) (object))) We de\ufb01ne the expression (delay\u27e8expression\u27e9) to have the same meaning as the procedure call (make-promise (lambda () \u27e8expression\u27e9)) as follows (define-syntax delay (syntax-rules () ((delay expression) (make-promise (lambda ("}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 127488
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": ") expression))))),6. Standard procedures 33 wheremake-promise is de\ufb01ned as follows: (define make-promise (lambda (proc) (let ((result-ready? #f) (result #f)) (lambda () (if result-ready? result (let ((x (proc))) (if result-ready? result (begin (set! result-ready? #t) (set! result x) result)))))))) Rationale: A promise may refer to its own value, as in the last example above. Forcing such a promise may cause the promise to be forced a second time before the value of the \ufb01rst force has been computed. This com"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 128000
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "plicates the de\ufb01nition of make-promise . Various extensions to this semantics of delay andforce are supported in some implementations: \u2022Callingforce on an object that is not a promise may simply return the object. \u2022It may be the case that there is no means by which a promise can be operationally distinguished from its forced value. That is, expressions like the following may evaluate to either #tor to#f, depending on the implementation: (eqv? (delay 1) 1) =\u21d2 unspeci\ufb01ed (pair? (delay (cons 1 2))) =\u21d2 unspeci\ufb01"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 128512
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ed \u2022Some implementations may implement \u201cimplicit forc- ing,\u201d where the value of a promise is forced by primi- tive procedures like cdr and +: (+ (delay (* 3 7)) 13) =\u21d234 (call-with-current-continuation proc) procedure Proc must be a procedure of one argument. The procedure call-with-current-continuation packages up the cur- rent continuation (see the rationale below) as an \u201cescape procedure\u201d and passes it as an argument to proc. The es- cape procedure is a Scheme procedure that, if it is later called, will "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 129024
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "abandon whatever continuation is in e\ufb00ect at that later time and will instead use the continuation that was in e\ufb00ect when the escape procedure was created. Call- ing the escape procedure may cause the invocation of before and after thunks installed using dynamic-wind . The escape procedure accepts the same number of ar- guments as the continuation to the original call tocall-with-current-continuation . Except for continua- tions created by the call-with-values procedure, all con- tinuations take exactly one"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 129536
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " value. The e\ufb00ect of passing no value or more than one value to continuations that were not created by call-with-values is unspeci\ufb01ed. The escape procedure that is passed to proc has unlimited extent just like any other procedure in Scheme. It may be stored in variables or data structures and may be called as many times as desired. The following examples show only the most common ways in which call-with-current-continuation is used. If all real uses were as simple as these examples, there would be no need f"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 130048
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "or a procedure with the power of call-with-current-continuation . (call-with-current-continuation (lambda (exit) (for-each (lambda (x) (if (negative? x) (exit x))) \u2019(54 0 37 -3 245 19)) #t)) =\u21d2-3 (define list-length (lambda (obj) (call-with-current-continuation (lambda (return) (letrec ((r (lambda (obj) (cond ((null? obj) 0) ((pair? obj) (+ (r (cdr obj)) 1)) (else (return #f)))))) (r obj)))))) (list-length \u2019(1 2 3 4)) =\u21d24 (list-length \u2019(a b . c)) =\u21d2#f Rationale: A common use of call-with-current-continuatio"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 130560
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "n is for structured, non-local exits from loops or procedure bodies, but in factcall-with-current-continuation is extremely useful for implementing a wide variety of advanced control structures. Whenever a Scheme expression is evaluated there is a contin- uation wanting the result of the expression. The continuation represents an entire (default) future for the computation. If the expression is evaluated at top level, for example, then the con- tinuation might take the result, print it on the screen, prompt"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 131072
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " for the next input, evaluate it, and so on forever. Most of the time the continuation includes actions speci\ufb01ed by user code, as in a continuation that will take the result, multiply it by the value stored in a local variable, add seven, and give the answer to the top level continuation to be printed. Normally these ubiquitous continuations are hidden behind the scenes and pro- grammers do not think much about them. On rare occasions, however, a programmer may need to deal with continuations ex- plicitly.C"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 131584
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "all-with-current-continuation allows Scheme pro-34 Revised5Scheme grammers to do that by creating a procedure that acts just like the current continuation. Most programming languages incorporate one or more special- purpose escape constructs with names like exit,return , or evengoto. In 1965, however, Peter Landin [ 16] invented a general purpose escape operator called the J-operator. John Reynolds [ 24] described a simpler but equally powerful con- struct in 1972. The catch special form described by Sussma"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 132096
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "n and Steele in the 1975 report on Scheme is exactly the same as Reynolds\u2019s construct, though its name came from a less general construct in MacLisp. Several Scheme implementors noticed that the full power of the catch construct could be provided by a procedure instead of by a special syntactic construct, and the namecall-with-current-continuation was coined in 1982. This name is descriptive, but opinions di\ufb00er on the merits of such a long name, and some people use the name call/cc in- stead. (values obj..."}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 132608
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": ") procedure Delivers all of its arguments to its continuation. Except for continuations created by the call-with-values pro- cedure, all continuations take exactly one value. Values might be de\ufb01ned as follows: (define (values . things) (call-with-current-continuation (lambda (cont) (apply cont things)))) (call-with-values producer consumer ) procedure Calls its producer argument with no values and a contin- uation that, when passed some values, calls the consumer procedure with those values as arguments. Th"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 133120
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "e continua- tion for the call to consumer is the continuation of the call tocall-with-values . (call-with-values (lambda () (values 4 5)) (lambda (a b) b)) =\u21d25 (call-with-values * -) =\u21d2-1 (dynamic-wind before thunk after ) procedure Calls thunk without arguments, returning the result(s) of this call. Before and after are called, also without ar- guments, as required by the following rules (note that in the absence of calls to continuations captured using call-with-current-continuation the three arguments ar"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 133632
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "e called once each, in order). Before is called whenever execution enters the dynamic extent of the call to thunk and after is called whenever it exits that dynamic extent. The dynamic extent of a procedure call is the period be- tween when the call is initiated and when it returns. InScheme, because of call-with-current-continuation , the dynamic extent of a call may not be a single, connected time period. It is de\ufb01ned as follows: \u2022The dynamic extent is entered when execution of the body of the called proc"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 134144
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "edure begins. \u2022The dynamic extent is also entered when exe- cution is not within the dynamic extent and a continuation is invoked that was captured (using call-with-current-continuation ) during the dy- namic extent. \u2022It is exited when the called procedure returns. \u2022It is also exited when execution is within the dynamic extent and a continuation is invoked that was captured while not within the dynamic extent. If a second call to dynamic-wind occurs within the dynamic extent of the call to thunk and then a "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 134656
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "continuation is in- voked in such a way that the after s from these two invoca- tions ofdynamic-wind are both to be called, then the after associated with the second (inner) call to dynamic-wind is called \ufb01rst. If a second call to dynamic-wind occurs within the dy- namic extent of the call to thunk and then a continua- tion is invoked in such a way that the before s from these two invocations of dynamic-wind are both to be called, then the before associated with the \ufb01rst (outer) call to dynamic-wind is call"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 135168
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ed \ufb01rst. If invoking a continuation requires calling the before from one call to dynamic-wind and the after from another, then theafter is called \ufb01rst. The e\ufb00ect of using a captured continuation to enter or exit the dynamic extent of a call to before orafter is unde\ufb01ned. (let ((path \u2019()) (c #f)) (let ((add (lambda (s) (set! path (cons s path))))) (dynamic-wind (lambda () (add \u2019connect)) (lambda () (add (call-with-current-continuation (lambda (c0) (set! c c0) \u2019talk1)))) (lambda () (add \u2019disconnect))) (if (< "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 135680
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "(length path) 4) (c \u2019talk2) (reverse path)))) =\u21d2(connect talk1 disconnect connect talk2 disconnect)6. Standard procedures 35 6.5.Eval (eval expression environment-speci\ufb01er ) procedure Evaluates expression in the speci\ufb01ed environment and re- turns its value. Expression must be a valid Scheme expres- sion represented as data, and environment-speci\ufb01er must be a value returned by one of the three procedures de- scribed below. Implementations may extend eval to allow non-expression programs (de\ufb01nitions) as the \ufb01"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 136192
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "rst argument and to allow other values as environments, with the re- striction that eval is not allowed to create new bindings in the environments associated with null-environment or scheme-report-environment . (eval \u2019(* 7 3) (scheme-report-environment 5)) =\u21d221 (let ((f (eval \u2019(lambda (f x) (f x x)) (null-environment 5)))) (f + 10)) =\u21d220 (scheme-report-environment version) procedure (null-environment version) procedure Version must be the exact integer 5, corresponding to this revision of the Scheme report "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 136704
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "(the Revised5Report on Scheme). Scheme-report-environment returns a speci\ufb01er for an environment that is empty except for all bindings de- \ufb01ned in this report that are either required or both optional and supported by the implementation. Null-environment returns a speci\ufb01er for an environment that is empty except for the (syntactic) bindings for all syntactic keywords de- \ufb01ned in this report that are either required or both optional and supported by the implementation. Other values of version can be used to s"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 137216
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "pecify environments matching past revisions of this report, but their support is not required. An implementation will signal an error if version is neither 5nor another value supported by the implementation. The e\ufb00ect of assigning (through the use of eval ) a vari- able bound in a scheme-report-environment (for exam- plecar) is unspeci\ufb01ed. Thus the environments speci\ufb01ed byscheme-report-environment may be immutable. (interaction-environment) optional procedure This procedure returns a speci\ufb01er for the enviro"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 137728
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "nment that contains implementation-de\ufb01ned bindings, typically a su- perset of those listed in the report. The intent is that this procedure will return the environment in which the imple- mentation would evaluate expressions dynamically typed by the user.6.6. Input and output 6.6.1. Ports Ports represent input and output devices. To Scheme, an input port is a Scheme object that can deliver characters upon command, while an output port is a Scheme object that can accept characters. (call-with-input-file stri"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 138240
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ng proc )library procedure (call-with-output-file string proc )library procedure String should be a string naming a \ufb01le, and proc should be a procedure that accepts one argument. For call-with-input-file , the \ufb01le should already exist; for call-with-output-file , the e\ufb00ect is unspeci\ufb01ed if the \ufb01le already exists. These procedures call proc with one ar- gument: the port obtained by opening the named \ufb01le for input or output. If the \ufb01le cannot be opened, an error is signalled. If proc returns, then the port is"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 138752
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " closed automati- cally and the value(s) yielded by the proc is(are) returned. Ifproc does not return, then the port will not be closed automatically unless it is possible to prove that the port will never again be used for a read or write operation. Rationale: Because Scheme\u2019s escape procedures have un- limited extent, it is possible to escape from the current con- tinuation but later to escape back in. If implementations were permitted to close the port on any escape from the current continuation, then it"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 139264
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " would be impossible to write portable code using both call-with-current-continuation andcall-with-input-file orcall-with-output-file . (input-port? obj) procedure (output-port? obj) procedure Returns#tifobjis an input port or output port respec- tively, otherwise returns #f. (current-input-port) procedure (current-output-port) procedure Returns the current default input or output port. (with-input-from-file string thunk ) optional procedure (with-output-to-file string thunk ) optional procedure String shou"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 139776
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ld be a string naming a \ufb01le, and proc should be a procedure of no arguments. For with-input-from-file , the \ufb01le should already exist; for with-output-to-file , the e\ufb00ect is unspeci\ufb01ed if the \ufb01le already exists. The \ufb01le is opened for input or output, an input or output port connected to it is made the default value returned bycurrent-input-port orcurrent-output-port (and is36 Revised5Scheme used by(read) ,(write obj), and so forth), and the thunk is called with no arguments. When the thunk returns, the port "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 140288
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "is closed and the previous default is restored. With-input-from-file andwith-output-to-file re- turn(s) the value(s) yielded by thunk . If an escape pro- cedure is used to escape from the continuation of these procedures, their behavior is implementation dependent. (open-input-file \ufb01lename) procedure Takes a string naming an existing \ufb01le and returns an input port capable of delivering characters from the \ufb01le. If the \ufb01le cannot be opened, an error is signalled. (open-output-file \ufb01lename) procedure Takes a st"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 140800
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ring naming an output \ufb01le to be created and returns an output port capable of writing characters to a new \ufb01le by that name. If the \ufb01le cannot be opened, an error is signalled. If a \ufb01le with the given name already exists, the e\ufb00ect is unspeci\ufb01ed. (close-input-port port) procedure (close-output-port port) procedure Closes the \ufb01le associated with port, rendering the port in- capable of delivering or accepting characters. These rou- tines have no e\ufb00ect if the \ufb01le has already been closed. The value returned is u"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 141312
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "nspeci\ufb01ed. 6.6.2. Input (read) library procedure (read port) library procedure Read converts external representations of Scheme objects into the objects themselves. That is, it is a parser for the nonterminal\u27e8datum\u27e9(see sections 7.1.2 and6.3.2 ).Read returns the next object parsable from the given input port, updating port to point to the \ufb01rst character past the end of the external representation of the object. If an end of \ufb01le is encountered in the input before any char- acters are found that can begin an "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 141824
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "object, then an end of \ufb01le object is returned. The port remains open, and fur- ther attempts to read will also return an end of \ufb01le object. If an end of \ufb01le is encountered after the beginning of an object\u2019s external representation, but the external represen- tation is incomplete and therefore not parsable, an error is signalled. The port argument may be omitted, in which case it de- faults to the value returned by current-input-port . It is an error to read from a closed port.(read-char) procedure (read-cha"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 142336
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "r port) procedure Returns the next character available from the input port, updating the port to point to the following character. If no more characters are available, an end of \ufb01le object is returned. Port may be omitted, in which case it defaults to the value returned by current-input-port . (peek-char) procedure (peek-char port) procedure Returns the next character available from the input port, without updating the port to point to the following char- acter. If no more characters are available, an end o"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 142848
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "f \ufb01le object is returned. Port may be omitted, in which case it defaults to the value returned by current-input-port . Note: The value returned by a call to peek-char is the same as the value that would have been returned by a call to read-char with the same port. The only di\ufb00erence is that the very next call toread-char orpeek-char on that port will return the value returned by the preceding call to peek-char . In particular, a call topeek-char on an interactive port will hang waiting for input whenever a "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 143360
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "call to read-char would have hung. (eof-object? obj) procedure Returns#tifobjis an end of \ufb01le object, otherwise returns #f. The precise set of end of \ufb01le objects will vary among implementations, but in any case no end of \ufb01le object will ever be an object that can be read in using read . (char-ready?) procedure (char-ready? port) procedure Returns#tif a character is ready on the input port and returns#fotherwise. If char-ready returns#tthen the nextread-char operation on the given port is guaranteed not to h"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 143872
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ang. If the port is at end of \ufb01le then char-ready? returns#t.Port may be omitted, in which case it defaults to the value returned by current-input-port . Rationale: Char-ready? exists to make it possible for a pro- gram to accept characters from interactive ports without getting stuck waiting for input. Any input editors associated with such ports must ensure that characters whose existence has been as- serted by char-ready? cannot be rubbed out. If char-ready? were to return #fat end of \ufb01le, a port at end "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 144384
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "of \ufb01le would be indistinguishable from an interactive port that has no ready characters. 6.6.3. Output6. Standard procedures 37 (write obj) library procedure (write obj port) library procedure Writes a written representation of objto the given port. Strings that appear in the written representation are en- closed in doublequotes, and within those strings backslash and doublequote characters are escaped by backslashes. Character objects are written using the #\\notation. Write returns an unspeci\ufb01ed value. The"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 144896
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " port argument may be omitted, in which case it defaults to the value returned by current-output-port . (display obj) library procedure (display obj port) library procedure Writes a representation of objto the given port. Strings that appear in the written representation are not enclosed in doublequotes, and no characters are escaped within those strings. Character objects appear in the represen- tation as if written by write-char instead of by write . Display returns an unspeci\ufb01ed value. The port argument "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 145408
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "may be omitted, in which case it defaults to the value re- turned by current-output-port . Rationale: Write is intended for producing machine-readable output and display is for producing human-readable output. Implementations that allow \u201cslashi\ufb01cation\u201d within symbols will probably want write but notdisplay to slashify funny charac- ters in symbols. (newline) library procedure (newline port) library procedure Writes an end of line to port. Exactly how this is done di\ufb00ers from one operating system to another."}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 145920
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " Returns an unspeci\ufb01ed value. The port argument may be omit- ted, in which case it defaults to the value returned by current-output-port . (write-char char) procedure (write-char char port ) procedure Writes the character char (not an external representa- tion of the character) to the given port and returns an unspeci\ufb01ed value. The port argument may be omit- ted, in which case it defaults to the value returned by current-output-port . 6.6.4. System interface Questions of system interface generally fall outs"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 146432
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ide of the domain of this report. However, the following operations are important enough to deserve description here. (load \ufb01lename) optional procedure Filename should be a string naming an existing \ufb01le con- taining Scheme source code. The load procedure reads ex- pressions and de\ufb01nitions from the \ufb01le and evaluates themsequentially. It is unspeci\ufb01ed whether the results of the expressions are printed. The load procedure does not a\ufb00ect the values returned by current-input-port and current-output-port .Load re"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 146944
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "turns an unspeci\ufb01ed value. Rationale: For portability, load must operate on source \ufb01les. Its operation on other kinds of \ufb01les necessarily varies among implementations. (transcript-on \ufb01lename) optional procedure (transcript-off) optional procedure Filename must be a string naming an output \ufb01le to be cre- ated. The e\ufb00ect of transcript-on is to open the named \ufb01le for output, and to cause a transcript of subsequent interaction between the user and the Scheme system to be written to the \ufb01le. The transcript is en"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 147456
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ded by a call totranscript-off , which closes the transcript \ufb01le. Only one transcript may be in progress at any time, though some implementations may relax this restriction. The values re- turned by these procedures are unspeci\ufb01ed.38 Revised5Scheme 7. Formal syntax and semantics This chapter provides formal descriptions of what has al- ready been described informally in previous chapters of this report. 7.1. Formal syntax This section provides a formal syntax for Scheme written in an extended BNF. All space"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 147968
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "s in the grammar are for legibility. Case is insignif- icant; for example, #x1A and#X1a are equivalent.\u27e8empty\u27e9 stands for the empty string. The following extensions to BNF are used to make the de- scription more concise: \u27e8thing\u27e9* means zero or more occur- rences of\u27e8thing\u27e9; and\u27e8thing\u27e9+means at least one \u27e8thing\u27e9. 7.1.1. Lexical structure This section describes how individual tokens (identi\ufb01ers, numbers, etc.) are formed from sequences of characters. The following sections describe how expressions and pro- gra"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 148480
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ms are formed from sequences of tokens. \u27e8Intertoken space\u27e9may occur on either side of any token, but not within a token. Tokens which require implicit termination (identi\ufb01ers, numbers, characters, and dot) may be terminated by any \u27e8delimiter\u27e9, but not necessarily by anything else. The following \ufb01ve characters are reserved for future exten- sions to the language: [ ] { } | \u27e8token\u27e9 \u2212\u2192 \u27e8 identi\ufb01er\u27e9 | \u27e8 boolean\u27e9 | \u27e8 number\u27e9 | \u27e8character\u27e9 | \u27e8 string\u27e9 |(|)|#(|\u2019|`|,|,@|. \u27e8delimiter\u27e9 \u2212\u2192 \u27e8 whitespace\u27e9 |(|)|\"|; \u27e8whit"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 148992
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "espace\u27e9 \u2212\u2192 \u27e8 space or newline\u27e9 \u27e8comment\u27e9 \u2212\u2192;\u27e8all subsequent characters up to a line break\u27e9 \u27e8atmosphere\u27e9 \u2212\u2192 \u27e8 whitespace\u27e9 | \u27e8 comment\u27e9 \u27e8intertoken space\u27e9 \u2212\u2192 \u27e8 atmosphere\u27e9* \u27e8identi\ufb01er\u27e9 \u2212\u2192 \u27e8 initial\u27e9 \u27e8subsequent\u27e9* | \u27e8peculiar identi\ufb01er \u27e9 \u27e8initial\u27e9 \u2212\u2192 \u27e8 letter\u27e9 | \u27e8 special initial\u27e9 \u27e8letter\u27e9 \u2212\u2192a|b|c|...|z \u27e8special initial\u27e9 \u2212\u2192!|$|%|&|*|/|:|<|= |>|?|^|_|~ \u27e8subsequent\u27e9 \u2212\u2192 \u27e8 initial\u27e9 | \u27e8 digit\u27e9 | \u27e8special subsequent \u27e9 \u27e8digit\u27e9 \u2212\u21920|1|2|3|4|5|6|7|8|9 \u27e8special subsequent \u27e9 \u2212\u2192+|-|.|@ \u27e8peculiar identi\ufb01er \u27e9 \u2212\u2192+|-|...\u27e8synta"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 149504
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ctic keyword \u27e9 \u2212\u2192 \u27e8 expression keyword \u27e9 |else|=>|define |unquote|unquote-splicing \u27e8expression keyword \u27e9 \u2212\u2192quote|lambda|if |set!|begin|cond|and|or|case |let|let*|letrec|do|delay |quasiquote \u27e8variable\u27e9 \u2212\u2192 \u27e8 any\u27e8identi\ufb01er\u27e9that isn\u2019t also a\u27e8syntactic keyword \u27e9\u27e9 \u27e8boolean\u27e9 \u2212\u2192#t|#f \u27e8character\u27e9 \u2212\u2192#\\\u27e8any character\u27e9 |#\\\u27e8character name\u27e9 \u27e8character name\u27e9 \u2212\u2192space|newline \u27e8string\u27e9 \u2212\u2192\"\u27e8string element\u27e9*\" \u27e8string element\u27e9 \u2212\u2192 \u27e8 any character other than \"or\\\u27e9 |\\\"|\\\\ \u27e8number\u27e9 \u2212\u2192 \u27e8 num 2\u27e9| \u27e8num 8\u27e9 | \u27e8num 10\u27e9| \u27e8num 16\u27e9 The foll"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 150016
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "owing rules for \u27e8numR\u27e9,\u27e8complexR\u27e9,\u27e8realR\u27e9, \u27e8urealR\u27e9,\u27e8uintegerR\u27e9, and\u27e8pre\ufb01xR\u27e9should be repli- cated forR= 2,8,10,and 16. There are no rules for \u27e8decimal 2\u27e9,\u27e8decimal 8\u27e9, and\u27e8decimal 16\u27e9, which means that numbers containing decimal points or exponents must be in decimal radix. \u27e8numR\u27e9 \u2212\u2192 \u27e8 pre\ufb01xR\u27e9 \u27e8complexR\u27e9 \u27e8complexR\u27e9 \u2212\u2192 \u27e8 realR\u27e9 | \u27e8 realR\u27e9@\u27e8realR\u27e9 | \u27e8realR\u27e9+\u27e8urealR\u27e9i| \u27e8realR\u27e9-\u27e8urealR\u27e9i | \u27e8realR\u27e9+ i| \u27e8realR\u27e9- i |+\u27e8urealR\u27e9i|-\u27e8urealR\u27e9i|+ i|- i \u27e8realR\u27e9 \u2212\u2192 \u27e8 sign\u27e9 \u27e8urealR\u27e9 \u27e8urealR\u27e9 \u2212\u2192 \u27e8 uintegerR\u27e9 | \u27e8uintegerR\u27e9/\u27e8u"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 150528
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "integerR\u27e9 | \u27e8decimalR\u27e9 \u27e8decimal 10\u27e9 \u2212\u2192 \u27e8 uinteger 10\u27e9 \u27e8su\ufb03x\u27e9 |.\u27e8digit 10\u27e9+#*\u27e8su\ufb03x\u27e9 | \u27e8digit 10\u27e9+.\u27e8digit 10\u27e9*#*\u27e8su\ufb03x\u27e9 | \u27e8digit 10\u27e9+#+. #*\u27e8su\ufb03x\u27e9 \u27e8uintegerR\u27e9 \u2212\u2192 \u27e8 digitR\u27e9+#* \u27e8pre\ufb01xR\u27e9 \u2212\u2192 \u27e8 radixR\u27e9 \u27e8exactness\u27e9 | \u27e8exactness\u27e9 \u27e8radixR\u27e9 \u27e8su\ufb03x\u27e9 \u2212\u2192 \u27e8 empty\u27e9 | \u27e8exponent marker\u27e9 \u27e8sign\u27e9 \u27e8digit 10\u27e9+ \u27e8exponent marker\u27e9 \u2212\u2192e|s|f|d|l \u27e8sign\u27e9 \u2212\u2192 \u27e8 empty\u27e9 |+|- \u27e8exactness\u27e9 \u2212\u2192 \u27e8 empty\u27e9 |#i|#e \u27e8radix 2\u27e9 \u2212\u2192#b \u27e8radix 8\u27e9 \u2212\u2192#o \u27e8radix 10\u27e9 \u2212\u2192 \u27e8 empty\u27e9 |#d7. Formal syntax and semantics 39 \u27e8radix 16\u27e9 \u2212\u2192#x \u27e8digit 2\u27e9 \u2212\u21920|1 \u27e8digit 8\u27e9 \u2212\u21920|1|2|3"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 151040
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "|4|5|6|7 \u27e8digit 10\u27e9 \u2212\u2192 \u27e8 digit\u27e9 \u27e8digit 16\u27e9 \u2212\u2192 \u27e8 digit 10\u27e9 |a|b|c|d|e|f 7.1.2. External representations \u27e8Datum\u27e9is what the read procedure (section 6.6.2 ) suc- cessfully parses. Note that any string that parses as an \u27e8expression\u27e9will also parse as a \u27e8datum\u27e9. \u27e8datum\u27e9 \u2212\u2192 \u27e8 simple datum\u27e9 | \u27e8 compound datum \u27e9 \u27e8simple datum\u27e9 \u2212\u2192 \u27e8 boolean\u27e9 | \u27e8 number\u27e9 | \u27e8character\u27e9 | \u27e8 string\u27e9 | \u27e8 symbol\u27e9 \u27e8symbol\u27e9 \u2212\u2192 \u27e8 identi\ufb01er\u27e9 \u27e8compound datum \u27e9 \u2212\u2192 \u27e8 list\u27e9 | \u27e8 vector\u27e9 \u27e8list\u27e9 \u2212\u2192(\u27e8datum\u27e9*)|(\u27e8datum\u27e9+.\u27e8datum\u27e9) | \u27e8abbreviation\u27e9 \u27e8abbr"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 151552
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "eviation\u27e9 \u2212\u2192 \u27e8 abbrev pre\ufb01x\u27e9 \u27e8datum\u27e9 \u27e8abbrev pre\ufb01x\u27e9 \u2212\u2192\u2019|`|,|,@ \u27e8vector\u27e9 \u2212\u2192#(\u27e8datum\u27e9*) 7.1.3. Expressions \u27e8expression\u27e9 \u2212\u2192 \u27e8 variable\u27e9 | \u27e8literal\u27e9 | \u27e8procedure call\u27e9 | \u27e8lambda expression \u27e9 | \u27e8conditional\u27e9 | \u27e8assignment\u27e9 | \u27e8derived expression \u27e9 | \u27e8macro use\u27e9 | \u27e8macro block\u27e9 \u27e8literal\u27e9 \u2212\u2192 \u27e8 quotation\u27e9 | \u27e8 self-evaluating\u27e9 \u27e8self-evaluating\u27e9 \u2212\u2192 \u27e8 boolean\u27e9 | \u27e8 number\u27e9 | \u27e8character\u27e9 | \u27e8 string\u27e9 \u27e8quotation\u27e9 \u2212\u2192\u2019\u27e8datum\u27e9 |(quote\u27e8datum\u27e9) \u27e8procedure call\u27e9 \u2212\u2192(\u27e8operator\u27e9 \u27e8operand\u27e9*) \u27e8operator\u27e9 \u2212\u2192 \u27e8 expression\u27e9 \u27e8operand\u27e9 \u2212\u2192 "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 152064
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "\u27e8 expression\u27e9 \u27e8lambda expression \u27e9 \u2212\u2192(lambda\u27e8formals\u27e9 \u27e8body\u27e9) \u27e8formals\u27e9 \u2212\u2192(\u27e8variable\u27e9*)| \u27e8variable\u27e9 |(\u27e8variable\u27e9+.\u27e8variable\u27e9) \u27e8body\u27e9 \u2212\u2192 \u27e8 de\ufb01nition\u27e9*\u27e8sequence\u27e9 \u27e8sequence\u27e9 \u2212\u2192 \u27e8 command\u27e9*\u27e8expression\u27e9 \u27e8command\u27e9 \u2212\u2192 \u27e8 expression\u27e9 \u27e8conditional\u27e9 \u2212\u2192(if\u27e8test\u27e9 \u27e8consequent\u27e9 \u27e8alternate\u27e9) \u27e8test\u27e9 \u2212\u2192 \u27e8 expression\u27e9 \u27e8consequent\u27e9 \u2212\u2192 \u27e8 expression\u27e9 \u27e8alternate\u27e9 \u2212\u2192 \u27e8 expression\u27e9 | \u27e8 empty\u27e9\u27e8assignment\u27e9 \u2212\u2192(set!\u27e8variable\u27e9 \u27e8expression\u27e9) \u27e8derived expression \u27e9 \u2212\u2192 (cond\u27e8cond clause\u27e9+) |(cond\u27e8cond clause\u27e9*(else\u27e8sequence\u27e9)) |(case\u27e8expres"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 152576
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "sion\u27e9 \u27e8case clause\u27e9+) |(case\u27e8expression\u27e9 \u27e8case clause\u27e9* (else\u27e8sequence\u27e9)) |(and\u27e8test\u27e9*) |(or\u27e8test\u27e9*) |(let (\u27e8binding spec\u27e9*)\u27e8body\u27e9) |(let\u27e8variable\u27e9(\u27e8binding spec\u27e9*)\u27e8body\u27e9) |(let* (\u27e8binding spec\u27e9*)\u27e8body\u27e9) |(letrec (\u27e8binding spec\u27e9*)\u27e8body\u27e9) |(begin\u27e8sequence\u27e9) |(do (\u27e8iteration spec\u27e9*) (\u27e8test\u27e9 \u27e8do result\u27e9) \u27e8command\u27e9*) |(delay\u27e8expression\u27e9) | \u27e8quasiquotation\u27e9 \u27e8cond clause\u27e9 \u2212\u2192(\u27e8test\u27e9 \u27e8sequence\u27e9) |(\u27e8test\u27e9) |(\u27e8test\u27e9=>\u27e8recipient\u27e9) \u27e8recipient\u27e9 \u2212\u2192 \u27e8 expression\u27e9 \u27e8case clause\u27e9 \u2212\u2192((\u27e8datum\u27e9*)\u27e8sequence\u27e9) \u27e8binding spec\u27e9 \u2212\u2192(\u27e8v"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 153088
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ariable\u27e9 \u27e8expression\u27e9) \u27e8iteration spec\u27e9 \u2212\u2192(\u27e8variable\u27e9 \u27e8init\u27e9 \u27e8step\u27e9) |(\u27e8variable\u27e9 \u27e8init\u27e9) \u27e8init\u27e9 \u2212\u2192 \u27e8 expression\u27e9 \u27e8step\u27e9 \u2212\u2192 \u27e8 expression\u27e9 \u27e8do result\u27e9 \u2212\u2192 \u27e8 sequence\u27e9 | \u27e8 empty\u27e9 \u27e8macro use\u27e9 \u2212\u2192(\u27e8keyword\u27e9 \u27e8datum\u27e9*) \u27e8keyword\u27e9 \u2212\u2192 \u27e8 identi\ufb01er\u27e9 \u27e8macro block\u27e9 \u2212\u2192 (let-syntax (\u27e8syntax spec\u27e9*)\u27e8body\u27e9) |(letrec-syntax ( \u27e8syntax spec\u27e9*)\u27e8body\u27e9) \u27e8syntax spec\u27e9 \u2212\u2192(\u27e8keyword\u27e9 \u27e8transformer spec\u27e9) 7.1.4. Quasiquotations The following grammar for quasiquote expressions is not context-free. It is presented as a recipe for generatin"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 153600
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "g an in\ufb01nite number of production rules. Imagine a copy of the following rules for D= 1,2,3,....Dkeeps track of the nesting depth. \u27e8quasiquotation\u27e9 \u2212\u2192 \u27e8 quasiquotation 1\u27e9 \u27e8qq template 0\u27e9 \u2212\u2192 \u27e8 expression\u27e940 Revised5Scheme \u27e8quasiquotation D\u27e9 \u2212\u2192`\u27e8qq template D\u27e9 |(quasiquote\u27e8qq template D\u27e9) \u27e8qq template D\u27e9 \u2212\u2192 \u27e8 simple datum\u27e9 | \u27e8list qq template D\u27e9 | \u27e8vector qq template D\u27e9 | \u27e8unquotation D\u27e9 \u27e8list qq template D\u27e9 \u2212\u2192(\u27e8qq template or splice D\u27e9*) |(\u27e8qq template or splice D\u27e9+.\u27e8qq template D\u27e9) |\u2019\u27e8qq template D\u27e9 | \u27e8quas"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 154112
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "iquotation D+ 1\u27e9 \u27e8vector qq template D\u27e9 \u2212\u2192#(\u27e8qq template or splice D\u27e9*) \u27e8unquotation D\u27e9 \u2212\u2192,\u27e8qq template D\u22121\u27e9 |(unquote\u27e8qq template D\u22121\u27e9) \u27e8qq template or splice D\u27e9 \u2212\u2192 \u27e8 qq template D\u27e9 | \u27e8splicing unquotation D\u27e9 \u27e8splicing unquotation D\u27e9 \u2212\u2192,@\u27e8qq template D\u22121\u27e9 |(unquote-splicing \u27e8qq template D\u22121\u27e9) In\u27e8quasiquotation\u27e9s, a\u27e8list qq template D\u27e9can some- times be confused with either an \u27e8unquotation D\u27e9or a\u27e8splicing unquotation D\u27e9. The interpretation as an \u27e8unquotation\u27e9or\u27e8splicing unquotation D\u27e9takes prece- dence. 7.1"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 154624
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": ".5. Transformers \u27e8transformer spec\u27e9 \u2212\u2192 (syntax-rules ( \u27e8identi\ufb01er\u27e9*)\u27e8syntax rule\u27e9*) \u27e8syntax rule\u27e9 \u2212\u2192(\u27e8pattern\u27e9 \u27e8template\u27e9) \u27e8pattern\u27e9 \u2212\u2192 \u27e8 pattern identi\ufb01er\u27e9 |(\u27e8pattern\u27e9*) |(\u27e8pattern\u27e9+.\u27e8pattern\u27e9) |(\u27e8pattern\u27e9*\u27e8pattern\u27e9 \u27e8ellipsis\u27e9) |#(\u27e8pattern\u27e9*) |#(\u27e8pattern\u27e9*\u27e8pattern\u27e9 \u27e8ellipsis\u27e9) | \u27e8pattern datum\u27e9 \u27e8pattern datum\u27e9 \u2212\u2192 \u27e8 string\u27e9 | \u27e8character\u27e9 | \u27e8boolean\u27e9 | \u27e8number\u27e9 \u27e8template\u27e9 \u2212\u2192 \u27e8 pattern identi\ufb01er\u27e9 |(\u27e8template element \u27e9*) |(\u27e8template element \u27e9+.\u27e8template\u27e9) |#(\u27e8template element \u27e9*) | \u27e8template datum\u27e9 \u27e8template e"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 155136
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "lement \u27e9 \u2212\u2192 \u27e8 template\u27e9 | \u27e8template\u27e9 \u27e8ellipsis\u27e9 \u27e8template datum\u27e9 \u2212\u2192 \u27e8 pattern datum\u27e9 \u27e8pattern identi\ufb01er\u27e9 \u2212\u2192 \u27e8 any identi\ufb01er except ...\u27e9 \u27e8ellipsis\u27e9 \u2212\u2192 \u27e8 the identi\ufb01er ...\u27e9 7.1.6. Programs and de\ufb01nitions \u27e8program\u27e9 \u2212\u2192 \u27e8 command or de\ufb01nition \u27e9*\u27e8command or de\ufb01nition \u27e9 \u2212\u2192 \u27e8 command\u27e9 | \u27e8de\ufb01nition\u27e9 | \u27e8syntax de\ufb01nition\u27e9 |(begin\u27e8command or de\ufb01nition \u27e9+) \u27e8de\ufb01nition\u27e9 \u2212\u2192(define\u27e8variable\u27e9 \u27e8expression\u27e9) |(define (\u27e8variable\u27e9 \u27e8def formals\u27e9)\u27e8body\u27e9) |(begin\u27e8de\ufb01nition\u27e9*) \u27e8def formals\u27e9 \u2212\u2192 \u27e8 variable\u27e9* | \u27e8variable\u27e9*.\u27e8variable\u27e9 \u27e8"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 155648
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "syntax de\ufb01nition\u27e9 \u2212\u2192 (define-syntax \u27e8keyword\u27e9 \u27e8transformer spec\u27e9) 7.2. Formal semantics This section provides a formal denotational semantics for the primitive expressions of Scheme and selected built-in procedures. The concepts and notation used here are de- scribed in [ 29]; the notation is summarized below: \u27e8...\u27e9 sequence formation s\u2193k k th member of the sequence s(1-based) #s length of sequence s s\u00a7t concatenation of sequences sandt s\u2020k drop the \ufb01rst kmembers of sequence s t\u2192a,b McCarthy conditional \u201cif"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 156160
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " tthenaelseb\u201d \u03c1[x/i] substitution \u201c \u03c1withxfori\u201d xinD injection of xinto domain D x|D projection of xto domain D The reason that expression continuations take sequences of values instead of single values is to simplify the formal treatment of procedure calls and multiple return values. The boolean \ufb02ag associated with pairs, vectors, and strings will be true for mutable objects and false for immutable objects. The order of evaluation within a call is unspeci\ufb01ed. We mimic that here by applying arbitrary permut"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 156672
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ations per- mute and unpermute , which must be inverses, to the argu- ments in a call before and after they are evaluated. This is not quite right since it suggests, incorrectly, that the order of evaluation is constant throughout a program (for any given number of arguments), but it is a closer approxima- tion to the intended semantics than a left-to-right evalua- tion would be. The storage allocator new is implementation-dependent, but it must obey the following axiom: if new\u03c3\u2208L, then \u03c3(new\u03c3|L)\u21932 =false. "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 157184
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "The de\ufb01nition of Kis omitted because an accurate de\ufb01ni- tion ofKwould complicate the semantics without being very interesting. If P is a program in which all variables are de\ufb01ned before being referenced or assigned, then the meaning of P is E[ [((lambda ( I*)P\u2019)\u27e8unde\ufb01ned\u27e9...)] ]7. Formal syntax and semantics 41 where I* is the sequence of variables de\ufb01ned in P, P\u2032is the sequence of expressions obtained by replacing every de\ufb01ni- tion in P by an assignment, \u27e8unde\ufb01ned\u27e9is an expression that evaluates to unde\ufb01ne"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 157696
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "d , andEis the semantic function that assigns meaning to expressions. 7.2.1. Abstract syntax K\u2208Con constants, including quotations I\u2208Ide identi\ufb01ers (variables) E\u2208Exp expressions \u0393\u2208Com = Exp commands Exp\u2212\u2192 K|I|(E0E*) |(lambda ( I*)\u0393* E 0) |(lambda ( I*.I)\u0393* E 0) |(lambda I \u0393* E 0) |(if E0E1E2)|(if E0E1) |(set! I E) 7.2.2. Domain equations \u03b1\u2208L locations \u03bd\u2208N natural numbers T={false, true} booleans Q symbols H characters R numbers Ep=L\u00d7L\u00d7T pairs Ev=L*\u00d7T vectors Es=L*\u00d7T strings M={false, true, null, unde\ufb01ned, u"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 158208
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "nspeci\ufb01ed } miscellaneous \u03c6\u2208F=L\u00d7(E*\u2192K\u2192C) procedure values \u03f5\u2208E=Q+H+R+Ep+Ev+Es+M+F expressed values \u03c3\u2208S=L\u2192(E\u00d7T) stores \u03c1\u2208U= Ide\u2192L environments \u03b8\u2208C=S\u2192A command continuations \u03ba\u2208K=E*\u2192C expression continuations A answers X errors 7.2.3. Semantic functions K: Con\u2192E E: Exp\u2192U\u2192K\u2192C E* : Exp*\u2192U\u2192K\u2192C C: Com*\u2192U\u2192C\u2192C De\ufb01nition ofKdeliberately omitted. E[ [K] ] =\u03bb\u03c1\u03ba. send (K[ [K] ])\u03baE[ [I] ] =\u03bb\u03c1\u03ba. hold(lookup\u03c1I) (single (\u03bb\u03f5.\u03f5 =unde\ufb01ned\u2192 wrong \u201cunde\ufb01ned variable\u201d , send\u03f5\u03ba)) E[ [(E0E*)] ] = \u03bb\u03c1\u03ba.E*(permute (\u27e8E0\u27e9\u00a7E*)) \u03c1 (\u03bb\u03f5*.((\u03bb"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 158720
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "\u03f5*.applicate (\u03f5*\u21931) (\u03f5*\u20201)\u03ba) (unpermute\u03f5*))) E[ [(lambda ( I*)\u0393* E 0)] ] = \u03bb\u03c1\u03ba.\u03bb\u03c3. new\u03c3\u2208L\u2192 send (\u27e8new\u03c3|L, \u03bb\u03f5*\u03ba\u2032.#\u03f5* = #I*\u2192 tievals (\u03bb\u03b1*.(\u03bb\u03c1\u2032.C[ [\u0393*] ]\u03c1\u2032(E[ [E0] ]\u03c1\u2032\u03ba\u2032)) (extends\u03c1I*\u03b1*)) \u03f5*, wrong \u201cwrong number of arguments\u201d \u27e9 inE) \u03ba (update (new\u03c3|L)unspeci\ufb01ed\u03c3), wrong \u201cout of memory\u201d \u03c3 E[ [(lambda ( I*.I)\u0393* E 0)] ] = \u03bb\u03c1\u03ba.\u03bb\u03c3. new\u03c3\u2208L\u2192 send (\u27e8new\u03c3|L, \u03bb\u03f5*\u03ba\u2032.#\u03f5*\u2265#I*\u2192 tievalsrest (\u03bb\u03b1*.(\u03bb\u03c1\u2032.C[ [\u0393*] ]\u03c1\u2032(E[ [E0] ]\u03c1\u2032\u03ba\u2032)) (extends\u03c1(I*\u00a7\u27e8I\u27e9)\u03b1*)) \u03f5* (#I*), wrong \u201ctoo few arguments\u201d \u27e9inE) \u03ba (update (new\u03c3|L)unspeci\ufb01ed\u03c3), wr"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 159232
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ong \u201cout of memory\u201d \u03c3 E[ [(lambda I \u0393* E 0)] ] =E[ [(lambda ( .I)\u0393* E 0)] ] E[ [(ifE0E1E2)] ] = \u03bb\u03c1\u03ba.E[ [E0] ]\u03c1(single (\u03bb\u03f5.truish\u03f5\u2192E[ [E1] ]\u03c1\u03ba, E[ [E2] ]\u03c1\u03ba)) E[ [(ifE0E1)] ] = \u03bb\u03c1\u03ba.E[ [E0] ]\u03c1(single (\u03bb\u03f5.truish\u03f5\u2192E[ [E1] ]\u03c1\u03ba, send unspeci\ufb01ed \u03ba)) Here and elsewhere, any expressed value other than unde\ufb01ned may be used in place of unspeci\ufb01ed . E[ [(set! I E)] ] = \u03bb\u03c1\u03ba.E[ [E] ]\u03c1(single (\u03bb\u03f5.assign (lookup\u03c1I) \u03f5 (send unspeci\ufb01ed \u03ba))) E*[ [ ] ] =\u03bb\u03c1\u03ba.\u03ba\u27e8\u27e9 E*[ [E0E*] ] = \u03bb\u03c1\u03ba.E[ [E0] ]\u03c1(single (\u03bb\u03f50.E*[ [E*] ]\u03c1(\u03bb\u03f5*.\u03ba(\u27e8\u03f50\u27e9\u00a7\u03f5*"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 159744
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": ")))) C[ [ ] ] =\u03bb\u03c1\u03b8.\u03b8 C[ [\u03930\u0393*] ] =\u03bb\u03c1\u03b8.E[ [\u03930] ]\u03c1(\u03bb\u03f5*.C[ [\u0393*] ]\u03c1\u03b8)42 Revised5Scheme 7.2.4. Auxiliary functions lookup :U\u2192Ide\u2192L lookup =\u03bb\u03c1I.\u03c1I extends :U\u2192Ide*\u2192L*\u2192U extends = \u03bb\u03c1I*\u03b1*.#I* = 0\u2192\u03c1, extends (\u03c1[(\u03b1*\u21931)/(I*\u21931)]) (I*\u20201) (\u03b1*\u20201) wrong :X\u2192C [implementation-dependent] send :E\u2192K\u2192C send =\u03bb\u03f5\u03ba.\u03ba\u27e8\u03f5\u27e9 single : (E\u2192C)\u2192K single = \u03bb\u03c8\u03f5*.#\u03f5* = 1\u2192\u03c8(\u03f5*\u21931), wrong \u201cwrong number of return values\u201d new:S\u2192(L+{error}) [implementation-dependent] hold:L\u2192K\u2192C hold=\u03bb\u03b1\u03ba\u03c3. send (\u03c3\u03b1\u21931)\u03ba\u03c3 assign :L\u2192E\u2192C\u2192C assign =\u03bb\u03b1\u03f5\u03b8\u03c3.\u03b8 (update\u03b1\u03f5\u03c3) updat"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 160256
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "e :L\u2192E\u2192S\u2192S update =\u03bb\u03b1\u03f5\u03c3.\u03c3 [\u27e8\u03f5,true\u27e9/\u03b1] tievals : (L*\u2192C)\u2192E*\u2192C tievals = \u03bb\u03c8\u03f5*\u03c3.#\u03f5* = 0\u2192\u03c8\u27e8\u27e9\u03c3, new\u03c3\u2208L\u2192tievals (\u03bb\u03b1*.\u03c8(\u27e8new\u03c3|L\u27e9\u00a7\u03b1*)) (\u03f5*\u20201) (update (new\u03c3|L)(\u03f5*\u21931)\u03c3), wrong \u201cout of memory\u201d \u03c3 tievalsrest : (L*\u2192C)\u2192E*\u2192N\u2192C tievalsrest = \u03bb\u03c8\u03f5*\u03bd.list(drop\ufb01rst\u03f5*\u03bd) (single (\u03bb\u03f5.tievals\u03c8((take\ufb01rst\u03f5*\u03bd)\u00a7\u27e8\u03f5\u27e9))) drop\ufb01rst =\u03bbln.n = 0\u2192l,drop\ufb01rst (l\u20201)(n\u22121) take\ufb01rst =\u03bbln.n = 0\u2192\u27e8\u27e9,\u27e8l\u21931\u27e9\u00a7(take\ufb01rst (l\u20201)(n\u22121)) truish :E\u2192T truish =\u03bb\u03f5.\u03f5 =false\u2192false,true permute : Exp*\u2192Exp* [implementation-dependent] unpermute :E*\u2192E* [inverse of permute "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 160768
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "] applicate :E\u2192E*\u2192K\u2192C applicate = \u03bb\u03f5\u03f5*\u03ba.\u03f5\u2208F\u2192(\u03f5|F\u21932)\u03f5*\u03ba,wrong \u201cbad procedure\u201d onearg : (E\u2192K\u2192C)\u2192(E*\u2192K\u2192C) onearg = \u03bb\u03b6\u03f5*\u03ba.#\u03f5* = 1\u2192\u03b6(\u03f5*\u21931)\u03ba, wrong \u201cwrong number of arguments\u201d twoarg : (E\u2192E\u2192K\u2192C)\u2192(E*\u2192K\u2192C) twoarg = \u03bb\u03b6\u03f5*\u03ba.#\u03f5* = 2\u2192\u03b6(\u03f5*\u21931)(\u03f5*\u21932)\u03ba, wrong \u201cwrong number of arguments\u201dlist:E*\u2192K\u2192C list= \u03bb\u03f5*\u03ba.#\u03f5* = 0\u2192send null\u03ba, list(\u03f5*\u20201)(single (\u03bb\u03f5.cons\u27e8\u03f5*\u21931,\u03f5\u27e9\u03ba)) cons :E*\u2192K\u2192C cons = twoarg (\u03bb\u03f51\u03f52\u03ba\u03c3.new\u03c3\u2208L\u2192 (\u03bb\u03c3\u2032.new\u03c3\u2032\u2208L\u2192 send (\u27e8new\u03c3|L,new\u03c3\u2032|L,true\u27e9 inE) \u03ba (update (new\u03c3\u2032|L)\u03f52\u03c3\u2032), wrong \u201cout of memory\u201d \u03c3\u2032) (update (new\u03c3|L)\u03f51"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 161280
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "\u03c3), wrong \u201cout of memory\u201d \u03c3) less:E*\u2192K\u2192C less= twoarg (\u03bb\u03f51\u03f52\u03ba.(\u03f51\u2208R\u2227\u03f52\u2208R)\u2192 send (\u03f51|R<\u03f52|R\u2192true,false)\u03ba, wrong \u201cnon-numeric argument to <\u201d) add:E*\u2192K\u2192C add= twoarg (\u03bb\u03f51\u03f52\u03ba.(\u03f51\u2208R\u2227\u03f52\u2208R)\u2192 send ((\u03f51|R+\u03f52|R) inE)\u03ba, wrong \u201cnon-numeric argument to +\u201d) car:E*\u2192K\u2192C car= onearg (\u03bb\u03f5\u03ba.\u03f5\u2208Ep\u2192hold(\u03f5|Ep\u21931)\u03ba, wrong \u201cnon-pair argument to car\u201d) cdr:E*\u2192K\u2192C [similar to car] setcar :E*\u2192K\u2192C setcar = twoarg (\u03bb\u03f51\u03f52\u03ba.\u03f51\u2208Ep\u2192 (\u03f51|Ep\u21933)\u2192assign (\u03f51|Ep\u21931) \u03f52 (send unspeci\ufb01ed \u03ba), wrong \u201cimmutable argument to set-car! \u201d, wrong \u201cnon-pair argu"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 161792
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ment to set-car! \u201d) eqv:E*\u2192K\u2192C eqv= twoarg (\u03bb\u03f51\u03f52\u03ba.(\u03f51\u2208M\u2227\u03f52\u2208M)\u2192 send (\u03f51|M=\u03f52|M\u2192true,false)\u03ba, (\u03f51\u2208Q\u2227\u03f52\u2208Q)\u2192 send (\u03f51|Q=\u03f52|Q\u2192true,false)\u03ba, (\u03f51\u2208H\u2227\u03f52\u2208H)\u2192 send (\u03f51|H=\u03f52|H\u2192true,false)\u03ba, (\u03f51\u2208R\u2227\u03f52\u2208R)\u2192 send (\u03f51|R=\u03f52|R\u2192true,false)\u03ba, (\u03f51\u2208Ep\u2227\u03f52\u2208Ep)\u2192 send ((\u03bbp1p2.((p1\u21931) = (p2\u21931)\u2227 (p1\u21932) = (p2\u21932))\u2192true, false) (\u03f51|Ep) (\u03f52|Ep)) \u03ba,7. Formal syntax and semantics 43 (\u03f51\u2208Ev\u2227\u03f52\u2208Ev)\u2192..., (\u03f51\u2208Es\u2227\u03f52\u2208Es)\u2192..., (\u03f51\u2208F\u2227\u03f52\u2208F)\u2192 send ((\u03f51|F\u21931) = (\u03f52|F\u21931)\u2192true,false) \u03ba, send false\u03ba) apply :E*\u2192K\u2192C apply = twoarg (\u03bb\u03f51\u03f52\u03ba.\u03f51\u2208F\u2192valueslist\u27e8\u03f52"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 162304
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "\u27e9(\u03bb\u03f5*.applicate\u03f51\u03f5*\u03ba), wrong \u201cbad procedure argument to apply \u201d) valueslist :E*\u2192K\u2192C valueslist = onearg (\u03bb\u03f5\u03ba.\u03f5\u2208Ep\u2192 cdr\u27e8\u03f5\u27e9 (\u03bb\u03f5*.valueslist \u03f5* (\u03bb\u03f5*.car\u27e8\u03f5\u27e9(single (\u03bb\u03f5.\u03ba (\u27e8\u03f5\u27e9\u00a7\u03f5*))))), \u03f5=null\u2192\u03ba\u27e8\u27e9, wrong \u201cnon-list argument to values-list \u201d) cwcc :E*\u2192K\u2192C [call-with-current-continuation ] cwcc = onearg (\u03bb\u03f5\u03ba.\u03f5\u2208F\u2192 (\u03bb\u03c3.new\u03c3\u2208L\u2192 applicate\u03f5 \u27e8\u27e8new\u03c3|L,\u03bb\u03f5*\u03ba\u2032.\u03ba\u03f5*\u27e9inE\u27e9 \u03ba (update (new\u03c3|L) unspeci\ufb01ed \u03c3), wrong \u201cout of memory\u201d \u03c3), wrong \u201cbad procedure argument\u201d) values :E*\u2192K\u2192C values =\u03bb\u03f5*\u03ba.\u03ba\u03f5 * cwv:E*\u2192K\u2192C [call-with-values ] cwv"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 162816
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "= twoarg (\u03bb\u03f51\u03f52\u03ba.applicate\u03f51\u27e8\u27e9(\u03bb\u03f5*.applicate\u03f52\u03f5*)) 7.3. Derived expression types This section gives macro de\ufb01nitions for the derived expres- sion types in terms of the primitive expression types (lit- eral, variable, call, lambda ,if,set! ). See section 6.4for a possible de\ufb01nition of delay . (define-syntax cond (syntax-rules (else =>) ((cond (else result1 result2 ...)) (begin result1 result2 ...)) ((cond (test => result)) (let ((temp test)) (if temp (result temp)))) ((cond (test => result) clause1 clause2 ."}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 163328
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "..) (let ((temp test)) (if temp (result temp) (cond clause1 clause2 ...))))((cond (test)) test) ((cond (test) clause1 clause2 ...) (let ((temp test)) (if temp temp (cond clause1 clause2 ...)))) ((cond (test result1 result2 ...)) (if test (begin result1 result2 ...))) ((cond (test result1 result2 ...) clause1 clause2 ...) (if test (begin result1 result2 ...) (cond clause1 clause2 ...))))) (define-syntax case (syntax-rules (else) ((case (key ...) clauses ...) (let ((atom-key (key ...))) (case atom-key clauses"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 163840
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " ...))) ((case key (else result1 result2 ...)) (begin result1 result2 ...)) ((case key ((atoms ...) result1 result2 ...)) (if (memv key \u2019(atoms ...)) (begin result1 result2 ...))) ((case key ((atoms ...) result1 result2 ...) clause clauses ...) (if (memv key \u2019(atoms ...)) (begin result1 result2 ...) (case key clause clauses ...))))) (define-syntax and (syntax-rules () ((and) #t) ((and test) test) ((and test1 test2 ...) (if test1 (and test2 ...) #f)))) (define-syntax or (syntax-rules () ((or) #f) ((or test) "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 164352
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "test) ((or test1 test2 ...) (let ((x test1)) (if x x (or test2 ...)))))) (define-syntax let (syntax-rules () ((let ((name val) ...) body1 body2 ...) ((lambda (name ...) body1 body2 ...) val ...)) ((let tag ((name val) ...) body1 body2 ...) ((letrec ((tag (lambda (name ...) body1 body2 ...))) tag)44 Revised5Scheme val ...)))) (define-syntax let* (syntax-rules () ((let* () body1 body2 ...) (let () body1 body2 ...)) ((let* ((name1 val1) (name2 val2) ...) body1 body2 ...) (let ((name1 val1)) (let* ((name2 val2)"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 164864
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " ...) body1 body2 ...))))) The following letrec macro uses the symbol <undefined> in place of an expression which returns something that when stored in a location makes it an error to try to ob- tain the value stored in the location (no such expression is de\ufb01ned in Scheme). A trick is used to generate the tempo- rary names needed to avoid specifying the order in which the values are evaluated. This could also be accomplished by using an auxiliary macro. (define-syntax letrec (syntax-rules () ((letrec ((var1"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 165376
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " init1) ...) body ...) (letrec \"generate tempnames\" (var1 ...) () ((var1 init1) ...) body ...)) ((letrec \"generate tempnames\" () (temp1 ...) ((var1 init1) ...) body ...) (let ((var1 <undefined>) ...) (let ((temp1 init1) ...) (set! var1 temp1) ... body ...))) ((letrec \"generate tempnames\" (x y ...) (temp ...) ((var1 init1) ...) body ...) (letrec \"generate tempnames\" (y ...) (newtemp temp ...) ((var1 init1) ...) body ...)))) (define-syntax begin (syntax-rules () ((begin exp ...) ((lambda () exp ...))))) The f"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 165888
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ollowing alternative expansion for begin does not make use of the ability to write more than one expressionin the body of a lambda expression. In any case, note that these rules apply only if the body of the begin contains no de\ufb01nitions. (define-syntax begin (syntax-rules () ((begin exp) exp) ((begin exp1 exp2 ...) (let ((x exp1)) (begin exp2 ...))))) The following de\ufb01nition of douses a trick to expand the variable clauses. As with letrec above, an auxiliary macro would also work. The expression (if #f #f) "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 166400
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "is used to obtain an unspeci\ufb01c value. (define-syntax do (syntax-rules () ((do ((var init step ...) ...) (test expr ...) command ...) (letrec ((loop (lambda (var ...) (if test (begin (if #f #f) expr ...) (begin command ... (loop (do \"step\" var step ...) ...)))))) (loop init ...))) ((do \"step\" x) x) ((do \"step\" x y) y)))Example 45 NOTES Language changes This section enumerates the changes that have been made to Scheme since the \u201cRevised4report\u201d [ 6] was published. \u2022The report is now a superset of the IEEE sta"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 166912
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ndard for Scheme [ 13]: implementations that conform to the report will also conform to the standard. This required the following changes: \u2013The empty list is now required to count as true. \u2013The classi\ufb01cation of features as essential or inessential has been removed. There are now three classes of built-in procedures: primitive, li- brary, and optional. The optional procedures are load ,with-input-from-file ,with-output- to-file ,transcript-on ,transcript-off , and interaction-environment , and-and/with more "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 167424
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "than two arguments. None of these are in the IEEE standard. \u2013Programs are allowed to rede\ufb01ne built-in proce- dures. Doing so will not change the behavior of other built-in procedures. \u2022Port has been added to the list of disjoint types. \u2022The macro appendix has been removed. High-level macros are now part of the main body of the report. The rewrite rules for derived expressions have been replaced with macro de\ufb01nitions. There are no reserved identi\ufb01ers. \u2022Syntax-rules now allows vector patterns. \u2022Multiple-value"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 167936
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " returns, eval , anddynamic-wind have been added. \u2022The calls that are required to be implemented in a properly tail-recursive fashion are de\ufb01ned explicitly. \u2022\u2018@\u2019 can be used within identi\ufb01ers. \u2018 |\u2019 is reserved for possible future extensions. ADDITIONAL MATERIAL The Internet Scheme Repository at http://www.cs.indiana.edu/scheme-repository/ contains an extensive Scheme bibliography, as well as pa- pers, programs, implementations, and other material re- lated to Scheme.EXAMPLE Integrate-system integrates the s"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 168448
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ystem y\u2032 k=fk(y1,y2,...,yn), k= 1,...,n of di\ufb00erential equations with the method of Runge-Kutta. The parameter system-derivative is a function that takes a system state (a vector of values for the state vari- ablesy1,...,yn) and produces a system derivative (the val- uesy\u2032 1,...,y\u2032 n). The parameter initial-state provides an initial system state, and his an initial guess for the length of the integration step. The value returned by integrate-system is an in\ufb01nite stream of system states. (define integrate-sy"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 168960
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "stem (lambda (system-derivative initial-state h) (let ((next (runge-kutta-4 system-derivative h))) (letrec ((states (cons initial-state (delay (map-streams next states))))) states)))) Runge-Kutta-4 takes a function, f, that produces a system derivative from a system state. Runge-Kutta-4 produces a function that takes a system state and produces a new system state. (define runge-kutta-4 (lambda (f h) (let ((*h (scale-vector h)) (*2 (scale-vector 2)) (*1/2 (scale-vector (/ 1 2))) (*1/6 (scale-vector (/ 1 6)))"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 169472
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": ") (lambda (y) ;; y is a system state (let* ((k0 (*h (f y))) (k1 (*h (f (add-vectors y (*1/2 k0))))) (k2 (*h (f (add-vectors y (*1/2 k1))))) (k3 (*h (f (add-vectors y k2))))) (add-vectors y (*1/6 (add-vectors k0 (*2 k1) (*2 k2) k3)))))))) (define elementwise (lambda (f) (lambda vectors (generate-vector (vector-length (car vectors)) (lambda (i) (apply f (map (lambda (v) (vector-ref v i)) vectors))))))) (define generate-vector (lambda (size proc)46 Revised5Scheme (let ((ans (make-vector size))) (letrec ((loop "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 169984
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "(lambda (i) (cond ((= i size) ans) (else (vector-set! ans i (proc i)) (loop (+ i 1))))))) (loop 0))))) (define add-vectors (elementwise +)) (define scale-vector (lambda (s) (elementwise (lambda (x) (* x s))))) Map-streams is analogous to map: it applies its \ufb01rst argu- ment (a procedure) to all the elements of its second argu- ment (a stream). (define map-streams (lambda (f s) (cons (f (head s)) (delay (map-streams f (tail s)))))) In\ufb01nite streams are implemented as pairs whose car holds the \ufb01rst element of t"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 170496
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "he stream and whose cdr holds a promise to deliver the rest of the stream. (define head car) (define tail (lambda (stream) (force (cdr stream)))) The following illustrates the use of integrate-system in integrating the system CdvC dt=\u2212iL\u2212vC R LdiL dt=vC which models a damped oscillator. (define damped-oscillator (lambda (R L C) (lambda (state) (let ((Vc (vector-ref state 0)) (Il (vector-ref state 1))) (vector (- 0 (+ (/ Vc (* R C)) (/ Il C))) (/ Vc L)))))) (define the-states (integrate-system (damped-oscill"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 171008
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ator 10000 1000 .001) \u2019#(1 0) .01))REFERENCES [1] Harold Abelson and Gerald Jay Sussman with Julie Sussman. Structure and Interpretation of Computer Programs, second edition. MIT Press, Cambridge, 1996. [2] Alan Bawden and Jonathan Rees. Syntactic closures. InProceedings of the 1988 ACM Symposium on Lisp and Functional Programming , pages 86\u201395. [3] Robert G. Burger and R. Kent Dybvig. Printing \ufb02oating-point numbers quickly and accurately. In Proceedings of the ACM SIGPLAN \u201996 Conference on Programming Lang"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 171520
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "uage Design and Implementa- tion, pages 108\u2013116. [4] William Clinger, editor. The revised revised report on Scheme, or an uncommon Lisp. MIT Arti\ufb01cial Intelligence Memo 848, August 1985. Also published as Computer Science Department Technical Report 174, Indiana University, June 1985. [5] William Clinger. How to read \ufb02oating point numbers accurately. In Proceedings of the ACM SIGPLAN \u201990 Conference on Programming Language Design and Implementation , pages 92\u2013101. Proceedings pub- lished as SIGPLAN Notices 2"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 172032
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "5(6), June 1990. [6] William Clinger and Jonathan Rees, editors. The revised4report on the algorithmic language Scheme. InACM Lisp Pointers 4(3), pages 1\u201355, 1991. [7] William Clinger and Jonathan Rees. Macros that work. In Proceedings of the 1991 ACM Conference on Principles of Programming Languages , pages 155\u2013 162. [8] William Clinger. Proper Tail Recursion and Space E\ufb03ciency. To appear in Proceedings of the 1998 ACM Conference on Programming Language Design and Implementation , June 1998. [9] R. Kent Dy"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 172544
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "bvig, Robert Hieb, and Carl Bruggeman. Syntactic abstraction in Scheme. Lisp and Symbolic Computation 5(4):295\u2013326, 1993. [10] Carol Fessenden, William Clinger, Daniel P. Fried- man, and Christopher Haynes. Scheme 311 version 4 reference manual. Indiana University Computer Sci- ence Technical Report 137, February 1983. Super- seded by [ 11]. [11] D. Friedman, C. Haynes, E. Kohlbecker, and M. Wand. Scheme 84 interim reference manual. Indi- ana University Computer Science Technical Report 153, January 1985.Re"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 173056
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ferences 47 [12] IEEE Standard 754-1985. IEEE Standard for Binary Floating-Point Arithmetic. IEEE, New York, 1985. [13] IEEE Standard 1178-1990. IEEE Standard for the Scheme Programming Language. IEEE, New York, 1991. [14] Eugene E. Kohlbecker Jr. Syntactic Extensions in the Programming Language Lisp. PhD thesis, Indi- ana University, August 1986. [15] Eugene E. Kohlbecker Jr., Daniel P. Friedman, Matthias Felleisen, and Bruce Duba. Hygienic macro expansion. In Proceedings of the 1986 ACM Con- ference on Li"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 173568
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "sp and Functional Programming , pages 151\u2013161. [16] Peter Landin. A correspondence between Algol 60 and Church\u2019s lambda notation: Part I. Communica- tions of the ACM 8(2):89\u2013101, February 1965. [17] MIT Department of Electrical Engineering and Com- puter Science. Scheme manual, seventh edition. September 1984. [18] Peter Naur et al. Revised report on the algorith- mic language Algol 60. Communications of the ACM 6(1):1\u201317, January 1963. [19] Paul Pen\ufb01eld, Jr. Principal values and branch cuts in complex APL."}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 174080
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " In APL \u201981 Conference Proceed- ings, pages 248\u2013256. ACM SIGAPL, San Fran- cisco, September 1981. Proceedings published as APL Quote Quad 12(1), ACM, September 1981. [20] Kent M. Pitman. The revised MacLisp manual (Sat- urday evening edition). MIT Laboratory for Com- puter Science Technical Report 295, May 1983. [21] Jonathan A. Rees and Norman I. Adams IV. T: A dialect of Lisp or, lambda: The ultimate software tool. In Conference Record of the 1982 ACM Sym- posium on Lisp and Functional Programming , pages"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 174592
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": " 114\u2013122. [22] Jonathan A. Rees, Norman I. Adams IV, and James R. Meehan. The T manual, fourth edition. Yale University Computer Science Department, January 1984. [23] Jonathan Rees and William Clinger, editors. The revised3report on the algorithmic language Scheme. InACM SIGPLAN Notices 21(12), pages 37\u201379, De- cember 1986. [24] John Reynolds. De\ufb01nitional interpreters for higher order programming languages. In ACM Conference Proceedings , pages 717\u2013740. ACM, 1972.[25] Guy Lewis Steele Jr. and Gerald Jay Su"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 175104
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ssman. The revised report on Scheme, a dialect of Lisp. MIT Ar- ti\ufb01cial Intelligence Memo 452, January 1978. [26] Guy Lewis Steele Jr. Rabbit: a compiler for Scheme. MIT Arti\ufb01cial Intelligence Laboratory Technical Re- port 474, May 1978. [27] Guy Lewis Steele Jr. Common Lisp: The Language, second edition. Digital Press, Burlington MA, 1990. [28] Gerald Jay Sussman and Guy Lewis Steele Jr. Scheme: an interpreter for extended lambda calcu- lus. MIT Arti\ufb01cial Intelligence Memo 349, December 1975. [29] Joseph E"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 175616
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": ". Stoy. Denotational Semantics: The Scott- Strachey Approach to Programming Language The- ory.MIT Press, Cambridge, 1977. [30] Texas Instruments, Inc. TI Scheme Language Ref- erence Manual. Preliminary version 1.0, November 1985.48 Revised5Scheme ALPHABETIC INDEX OF DEFINITIONS OF CONCEPTS, KEYWORDS, AND PROCEDURES The principal entry for each term, procedure, or keyword is listed \ufb01rst, separated from the other entries by a semicolon. !5 \u20198;26 *22 +22;5,42 ,13;26 ,@13 -22;5 ->5 ...5;14 /22 ;5 <21;42 <=21 =2"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 176128
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "1;22 =>10 >21 >=21 ?4 \u201813 abs22;24 acos 23 and11;43 angle 24 append 27 apply 32;8,43 asin 23 assoc 27 assq 27 assv 27 atan 23 #b21;38 backquote 13 begin 12;16,44 binding 6 binding construct 6 boolean? 25;6 bound 6 caar 26 cadr 26 call9 call by need 13 call-with-current-continuation 33;8,34,43 call-with-input-file 35 call-with-output-file 35 call-with-values 34;8,43 call/cc 34 car26;42case 10;43 catch 34 cdddar 26 cddddr 26 cdr26 ceiling 23 char->integer 29 char-alphabetic? 29 char-ci<=? 29 char-ci<? 29 char"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 176640
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "-ci=? 29 char-ci>=? 29 char-ci>? 29 char-downcase 29 char-lower-case? 29 char-numeric? 29 char-ready? 36 char-upcase 29 char-upper-case? 29 char-whitespace? 29 char<=? 29 char<? 29 char=? 29 char>=? 29 char>? 29 char? 29;6 close-input-port 36 close-output-port 36 combination 9 comma 13 comment 5;38 complex? 21;19 cond 10;15,43 cons 26 constant 7 continuation 33 cos23 current-input-port 35 current-output-port 35 #d21 define 16;14 define-syntax 17 de\ufb01nition 16 delay 13;32 denominator 23 display 37 do12;44 dot"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 177152
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ted pair 25 dynamic-wind 34;33 #e21;38Index 49 else 10 empty list 25;6,26 eof-object? 36 eq?18;10 equal? 19 equivalence predicate 17 eqv? 17;7,10,42 error 4 escape procedure 33 eval 35;8 even? 22 exact 17 exact->inexact 24 exact? 21 exactness 19 exp23 expt 24 #f25 false 6;25 floor 23 for-each 32 force 32;13 gcd23 hygienic 13 #i21;38 identi\ufb01er 5;6,28,38 if10;41 imag-part 24 immutable 7 implementation restriction 4;20 improper list 26 inexact 17 inexact->exact 24;20 inexact? 21 initial environment 17 input-po"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 177664
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "rt? 35 integer->char 29 integer? 21;19 interaction-environment 35 internal de\ufb01nition 16 keyword 13;38 lambda 9;16,41 lazy evaluation 13 lcm23 length 27;20 let11;12,15,16,43 let* 11;16,44 let-syntax 14;16 letrec 11;16,44 letrec-syntax 14;16library 3 library procedure 17 list 27 list->string 30 list->vector 31 list-ref 27 list-tail 27 list? 26 load 37 location 7 log23 macro 13 macro keyword 13 macro transformer 13 macro use 13 magnitude 24 make-polar 24 make-rectangular 24 make-string 30 make-vector 31 map32 "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 178176
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "max22 member 27 memq 27 memv 27 min22 modulo 22 mutable 7 negative? 22 newline 37 nil25 not25 null-environment 35 null? 26 number 19 number->string 24 number? 21;6,19 numerator 23 numerical types 19 #o21;38 object 3 odd? 22 open-input-file 36 open-output-file 36 optional 3 or11;43 output-port? 35 pair 25 pair? 26;6 peek-char 36 port 35 port? 650 Revised5Scheme positive? 22 predicate 17 procedure call 9 procedure? 31;6 promise 13;32 proper tail recursion 7 quasiquote 13;26 quote 8;26 quotient 22 rational? 21"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 178688
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": ";19 rationalize 23 read 36;26,39 read-char 36 real-part 24 real? 21;19 referentially transparent 13 region 6;10,11,12 remainder 22 reverse 27 round 23 scheme-report-environment 35 set! 10;16,41 set-car! 26 set-cdr! 26 setcar 42 simplest rational 23 sin23 sqrt 24 string 30 string->list 30 string->number 24 string->symbol 28 string-append 30 string-ci<=? 30 string-ci<? 30 string-ci=? 30 string-ci>=? 30 string-ci>? 30 string-copy 30 string-fill! 31 string-length 30;20 string-ref 30 string-set! 30;28 string<=? "}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 179200
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "30 string<? 30 string=? 30 string>=? 30 string>? 30 string? 30;6 substring 30 symbol->string 28;7 symbol? 28;6 syntactic keyword 6;5,13,38syntax de\ufb01nition 17 syntax-rules 14;17 #t25 tail call 7 tan23 token 38 top level environment 17;6 transcript-off 37 transcript-on 37 true 6;10,25 truncate 23 type 6 unbound 6;8,16 unquote 13;26 unquote-splicing 13;26 unspeci\ufb01ed 4 valid indexes 30;31 values 34;9 variable 6;5,8,38 vector 31 vector->list 31 vector-fill! 31 vector-length 31;20 vector-ref 31 vector-set! 31 vec"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 179712
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "tor? 31;6 whitespace 5 with-input-from-file 35 with-output-to-file 35 write 37;13 write-char 37 #x21;39 zero? 22................................................................................................................................................................................................................................................................................................................................................................................................................"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 1
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "PROPOSITIONAL LOGIC \u2013 REVIEW SET 1 CSC 335 PROFESSOR TROEGER Again, I strongly recommend David Liben-Nowell\u2019s excellent text, Discrete Mathematics for Computer Science. These problems are from his Chapters 3 and 5. Both can be solved using structural induction. (1) Prove that each proposition de\ufb01ned using the connectives \u2227,\u2228,\u00acand = \u21d2is logically equivalent to a proposition de\ufb01ned using only \u2227and\u00ac. (2) Let us say that a literal is a Boolean variable or the negation of a Boolean variable. (Sopand\u00acpare both li"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 513
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "terals.) A proposition is in conjunctive normal form if it is the conjunction of one or more clauses , where each clause is the disjunction of one or more literals. For example, ( \u00acp\u2228q\u2228r)\u2227(\u00acq\u2228\u00acr)\u2227(r) is in conjunctive normal form. Prove that each proposition de\ufb01ned using the connectives \u2227,\u2228,\u00acand = \u21d2 is logically equivalent to a proposition in conjunctive normal form. Date : September 15 2020. 1..................................................................................................................."}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 2
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "WEAK AND STRONG INDUCTION \u2013 REVIEW SET 1 CSC 335 PROFESSOR TROEGER I strongly recommend the text I used in CSc 104: David Liben-Nowell\u2019s excellent Discrete Mathematics for Computer Science, published by Wiley. These problems are from his Chapter 5. (1) Prove by (weak) induction on n: \u03a3i=n i=0i2=n(n+1)(2 n+1) 6 (2) Prove by (weak) induction on n: \u03a3i=n i=0i3=n4+2n3+n2 4 (3) Prove by (strong) induction on nthat, for every integer n\u22654, it is possible to make ndollars using only two- and \ufb01ve-dollar bills. (4) Pr"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 514
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "ove by (strong) induction on nthat, for every integer n\u22651, there exist k\u22650 prime numbers p1, p2, . . . , p ksuch that n= \u03a0i=k i=1pi (5) What is the sum of the \ufb01rst nodd positive integers? Prove your claim by induction. Date : February 3 2020. 1............................................................................................................................................................................................................................................................................"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 3
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "INDUCTION \u2013 REVIEW SET 2 CSC 335 PROFESSOR TROEGER Again, I strongly recommend David Liben-Nowell\u2019s excellent text, Discrete Mathematics for Computer Science, published by Wiley. These problems are from his Chapter 5. (1) In chess, a knight at position \u27e8r, c\u27e9can move in an L-shaped pattern to any of eight positions: moving over one row and up/down two columns, or two rows over and one column up/down. A knight\u2019s walk is a sequence of legal moves, starting from a square of your choice, that visits every squar"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 515
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "e of the board. Prove by induction that there exists a knight\u2019s walk for any n-by-nchessboard, for any n\u22654. Note that the knight (horse) may visit squares more than once. (2) A string of balanced parentheses [ , ] is one of the following: (a) the empty string; (b) a string [ S] where S is a string of balanced parentheses; or (c) a string S1S2where S1andS2are both balanced strings of parentheses. Prove by structural induction (a) Every string of balanced parentheses has exactly the same number of open parent"}


created_at: 2024-03-14 21:20:03
topic: persistent://default/default/4c74ce88-7764-4613-a058-494dac73625c
id: 1025
encoding: FLOAT32
metadata:
{"length": 512, "chroma:document": "heses as close parentheses; (b) Every pre\ufb01x of a string of balanced parentheses has at least as many open parentheses as it does close parentheses Date : February 3 2020. 1...................................................................................................................................................................................................................................................................................................................................................."}


