diff --git a/src/features/sicp/data/toc-navigation.json b/src/features/sicp/data/toc-navigation.json index bd5585b54c..008857445f 100644 --- a/src/features/sicp/data/toc-navigation.json +++ b/src/features/sicp/data/toc-navigation.json @@ -4,11 +4,12 @@ "3": { "next": "3.1", "prev": "2.5.3" }, "4": { "next": "4.1", "prev": "3.5.5" }, "5": { "next": "5.1", "prev": "4.4.4" }, - "foreword": { "next": "prefaces03", "prev": "index" }, - "prefaces03": { "next": "prefaces84", "prev": "foreword" }, + "foreword02": { "next": "foreword84", "prev": "index" }, + "foreword84": { "next": "prefaces03", "prev": "foreword02" }, + "prefaces03": { "next": "prefaces84", "prev": "foreword84" }, "prefaces84": { "next": "prefaces96", "prev": "prefaces03" }, "prefaces96": { "next": "acknowledgements", "prev": "prefaces84" }, - "acknowledgements": { "next": "1", "prev": "prefaces96" }, + "acknowledgements": { "next": "1", "prev": "acknowledgements" }, "1.1": { "next": "1.1.1", "prev": "1" }, "1.1.1": { "next": "1.1.2", "prev": "1.1" }, "1.1.2": { "next": "1.1.3", "prev": "1.1.1" }, @@ -127,5 +128,5 @@ "5.5.7": { "next": "references", "prev": "5.5.6" }, "references": { "next": "making-of", "prev": "5.5.7" }, "making-of": { "prev": "references" }, - "index": { "next": "foreword" } + "index": { "next": "foreword02" } } diff --git a/src/features/sicp/data/toc.json b/src/features/sicp/data/toc.json index 2442dffdfc..383446c5d7 100644 --- a/src/features/sicp/data/toc.json +++ b/src/features/sicp/data/toc.json @@ -1,11 +1,6 @@ [ - { "id": 0, "hasCaret": false, "label": "Foreword", "nodeData": "foreword" }, - { - "id": 1, - "hasCaret": false, - "label": "Foreword to SICP, 1984", - "nodeData": "foreword" - }, + { "id": 0, "hasCaret": false, "label": "Foreword", "nodeData": "foreword02" }, + { "id": 1, "hasCaret": false, "label": "Foreword to SICP, 1984", "nodeData": "foreword84" }, { "id": 2, "hasCaret": false, "label": "Preface", "nodeData": "prefaces03" }, { "id": 3, @@ -22,65 +17,61 @@ { "id": 5, "hasCaret": false, - "label": "Acknowledgments", + "label": "Acknowledgments for the JavaScript Adaptation", "nodeData": "acknowledgements" }, { - "id": 7, + "id": 6, + "hasCaret": false, + "label": "Acknowledgments from the Second Edition of SICP, 1996", + "nodeData": "acknowledgements" + }, + { + "id": 8, "hasCaret": true, "label": "1 Building Abstractions with Functions", "nodeData": "1", "childNodes": [ { - "id": 8, + "id": 9, "hasCaret": true, "label": "1.1 The Elements of Programming", "nodeData": "1.1", "childNodes": [ + { "id": 10, "hasCaret": false, "label": "1.1.1 Expressions", "nodeData": "1.1.1" }, { - "id": 9, - "hasCaret": false, - "label": "1.1.1 Expressions", - "nodeData": "1.1.1" - }, - { - "id": 10, + "id": 11, "hasCaret": false, "label": "1.1.2 Naming and the Environment", "nodeData": "1.1.2" }, { - "id": 11, + "id": 12, "hasCaret": false, "label": "1.1.3 Evaluating Operator Combinations", "nodeData": "1.1.3" }, + { "id": 13, "hasCaret": false, "label": "1.1.4 Compound Functions", "nodeData": "1.1.4" }, { - "id": 12, - "hasCaret": false, - "label": "1.1.4 Compound Functions", - "nodeData": "1.1.4" - }, - { - "id": 13, + "id": 14, "hasCaret": false, "label": "1.1.5 The Substitution Model for Function Application", "nodeData": "1.1.5" }, { - "id": 14, + "id": 15, "hasCaret": false, "label": "1.1.6 Conditional Expressions and Predicates", "nodeData": "1.1.6" }, { - "id": 15, + "id": 16, "hasCaret": false, "label": "1.1.7 Example: Square Roots by Newton's Method", "nodeData": "1.1.7" }, { - "id": 16, + "id": 17, "hasCaret": false, "label": "1.1.8 Functions as Black-Box Abstractions", "nodeData": "1.1.8" @@ -88,43 +79,28 @@ ] }, { - "id": 17, + "id": 18, "hasCaret": true, "label": "1.2 Functions and the Processes They Generate", "nodeData": "1.2", "childNodes": [ { - "id": 18, + "id": 19, "hasCaret": false, "label": "1.2.1 Linear Recursion and Iteration", "nodeData": "1.2.1" }, + { "id": 20, "hasCaret": false, "label": "1.2.2 Tree Recursion", "nodeData": "1.2.2" }, + { "id": 21, "hasCaret": false, "label": "1.2.3 Orders of Growth", "nodeData": "1.2.3" }, + { "id": 22, "hasCaret": false, "label": "1.2.4 Exponentiation", "nodeData": "1.2.4" }, { - "id": 19, - "hasCaret": false, - "label": "1.2.2 Tree Recursion", - "nodeData": "1.2.2" - }, - { - "id": 20, - "hasCaret": false, - "label": "1.2.3 Orders of Growth", - "nodeData": "1.2.3" - }, - { - "id": 21, - "hasCaret": false, - "label": "1.2.4 Exponentiation", - "nodeData": "1.2.4" - }, - { - "id": 22, + "id": 23, "hasCaret": false, "label": "1.2.5 Greatest Common Divisors", "nodeData": "1.2.5" }, { - "id": 23, + "id": 24, "hasCaret": false, "label": "1.2.6 Example: Testing for Primality", "nodeData": "1.2.6" @@ -132,31 +108,31 @@ ] }, { - "id": 24, + "id": 25, "hasCaret": true, "label": "1.3 Formulating Abstractions with Higher-Order Functions", "nodeData": "1.3", "childNodes": [ { - "id": 25, + "id": 26, "hasCaret": false, "label": "1.3.1 Functions as Arguments", "nodeData": "1.3.1" }, { - "id": 26, + "id": 27, "hasCaret": false, "label": "1.3.2 Constructing Functions using Lambda Expressions", "nodeData": "1.3.2" }, { - "id": 27, + "id": 28, "hasCaret": false, "label": "1.3.3 Functions as General Methods", "nodeData": "1.3.3" }, { - "id": 28, + "id": 29, "hasCaret": false, "label": "1.3.4 Functions as Returned Values", "nodeData": "1.3.4" @@ -166,37 +142,37 @@ ] }, { - "id": 29, + "id": 30, "hasCaret": true, "label": "2 Building Abstractions with Data", "nodeData": "2", "childNodes": [ { - "id": 30, + "id": 31, "hasCaret": true, "label": "2.1 Introduction to Data Abstraction", "nodeData": "2.1", "childNodes": [ { - "id": 31, + "id": 32, "hasCaret": false, "label": "2.1.1 Example: Arithmetic Operations for Rational Numbers", "nodeData": "2.1.1" }, { - "id": 32, + "id": 33, "hasCaret": false, "label": "2.1.2 Abstraction Barriers", "nodeData": "2.1.2" }, { - "id": 33, + "id": 34, "hasCaret": false, "label": "2.1.3 What Is Meant by Data?", "nodeData": "2.1.3" }, { - "id": 34, + "id": 35, "hasCaret": false, "label": "2.1.4 Extended Exercise: Interval Arithmetic", "nodeData": "2.1.4" @@ -204,31 +180,31 @@ ] }, { - "id": 35, + "id": 36, "hasCaret": true, "label": "2.2 Hierarchical Data and the Closure Property", "nodeData": "2.2", "childNodes": [ { - "id": 36, + "id": 37, "hasCaret": false, "label": "2.2.1 Representing Sequences", "nodeData": "2.2.1" }, { - "id": 37, + "id": 38, "hasCaret": false, "label": "2.2.2 Hierarchical Structures", "nodeData": "2.2.2" }, { - "id": 38, + "id": 39, "hasCaret": false, "label": "2.2.3 Sequences as Conventional Interfaces", "nodeData": "2.2.3" }, { - "id": 39, + "id": 40, "hasCaret": false, "label": "2.2.4 Example: A Picture Language", "nodeData": "2.2.4" @@ -236,31 +212,26 @@ ] }, { - "id": 40, + "id": 41, "hasCaret": true, "label": "2.3 Symbolic Data", "nodeData": "2.3", "childNodes": [ + { "id": 42, "hasCaret": false, "label": "2.3.1 Strings", "nodeData": "2.3.1" }, { - "id": 41, - "hasCaret": false, - "label": "2.3.1 Strings", - "nodeData": "2.3.1" - }, - { - "id": 42, + "id": 43, "hasCaret": false, "label": "2.3.2 Example: Symbolic Differentiation", "nodeData": "2.3.2" }, { - "id": 43, + "id": 44, "hasCaret": false, "label": "2.3.3 Example: Representing Sets", "nodeData": "2.3.3" }, { - "id": 44, + "id": 45, "hasCaret": false, "label": "2.3.4 Example: Huffman Encoding Trees", "nodeData": "2.3.4" @@ -268,25 +239,20 @@ ] }, { - "id": 45, + "id": 46, "hasCaret": true, "label": "2.4 Multiple Representations for Abstract Data", "nodeData": "2.4", "childNodes": [ { - "id": 46, + "id": 47, "hasCaret": false, "label": "2.4.1 Representations for Complex Numbers", "nodeData": "2.4.1" }, + { "id": 48, "hasCaret": false, "label": "2.4.2 Tagged data", "nodeData": "2.4.2" }, { - "id": 47, - "hasCaret": false, - "label": "2.4.2 Tagged data", - "nodeData": "2.4.2" - }, - { - "id": 48, + "id": 49, "hasCaret": false, "label": "2.4.3 Data-Directed Programming and Additivity", "nodeData": "2.4.3" @@ -294,25 +260,25 @@ ] }, { - "id": 49, + "id": 50, "hasCaret": true, "label": "2.5 Systems with Generic Operations", "nodeData": "2.5", "childNodes": [ { - "id": 50, + "id": 51, "hasCaret": false, "label": "2.5.1 Generic Arithmetic Operations", "nodeData": "2.5.1" }, { - "id": 51, + "id": 52, "hasCaret": false, "label": "2.5.2 Combining Data of Different Types", "nodeData": "2.5.2" }, { - "id": 52, + "id": 53, "hasCaret": false, "label": "2.5.3 Example: Symbolic Algebra", "nodeData": "2.5.3" @@ -322,31 +288,31 @@ ] }, { - "id": 53, + "id": 54, "hasCaret": true, "label": "3 Modularity, Objects, and State", "nodeData": "3", "childNodes": [ { - "id": 54, + "id": 55, "hasCaret": true, "label": "3.1 Assignment and Local State", "nodeData": "3.1", "childNodes": [ { - "id": 55, + "id": 56, "hasCaret": false, "label": "3.1.1 Local State Variables", "nodeData": "3.1.1" }, { - "id": 56, + "id": 57, "hasCaret": false, "label": "3.1.2 The Benefits of Introducing Assignment", "nodeData": "3.1.2" }, { - "id": 57, + "id": 58, "hasCaret": false, "label": "3.1.3 The Costs of Introducing Assignment", "nodeData": "3.1.3" @@ -354,31 +320,31 @@ ] }, { - "id": 58, + "id": 59, "hasCaret": true, "label": "3.2 The Environment Model of Evaluation", "nodeData": "3.2", "childNodes": [ { - "id": 59, + "id": 60, "hasCaret": false, "label": "3.2.1 The Rules for Evaluation", "nodeData": "3.2.1" }, { - "id": 60, + "id": 61, "hasCaret": false, "label": "3.2.2 Applying Simple Functions", "nodeData": "3.2.2" }, { - "id": 61, + "id": 62, "hasCaret": false, "label": "3.2.3 Frames as the Repository of Local State", "nodeData": "3.2.3" }, { - "id": 62, + "id": 63, "hasCaret": false, "label": "3.2.4 Internal Declarations", "nodeData": "3.2.4" @@ -386,37 +352,37 @@ ] }, { - "id": 63, + "id": 64, "hasCaret": true, "label": "3.3 Modeling with Mutable Data", "nodeData": "3.3", "childNodes": [ { - "id": 64, + "id": 65, "hasCaret": false, "label": "3.3.1 Mutable List Structure", "nodeData": "3.3.1" }, { - "id": 65, + "id": 66, "hasCaret": false, "label": "3.3.2 Representing Queues", "nodeData": "3.3.2" }, { - "id": 66, + "id": 67, "hasCaret": false, "label": "3.3.3 Representing Tables", "nodeData": "3.3.3" }, { - "id": 67, + "id": 68, "hasCaret": false, "label": "3.3.4 A Simulator for Digital Circuits", "nodeData": "3.3.4" }, { - "id": 68, + "id": 69, "hasCaret": false, "label": "3.3.5 Propagation of Constraints", "nodeData": "3.3.5" @@ -424,19 +390,19 @@ ] }, { - "id": 69, + "id": 70, "hasCaret": true, "label": "3.4 Concurrency: Time Is of the Essence", "nodeData": "3.4", "childNodes": [ { - "id": 70, + "id": 71, "hasCaret": false, "label": "3.4.1 The Nature of Time in Concurrent Systems", "nodeData": "3.4.1" }, { - "id": 71, + "id": 72, "hasCaret": false, "label": "3.4.2 Mechanisms for Controlling Concurrency", "nodeData": "3.4.2" @@ -444,37 +410,32 @@ ] }, { - "id": 72, + "id": 73, "hasCaret": true, "label": "3.5 Streams", "nodeData": "3.5", "childNodes": [ { - "id": 73, + "id": 74, "hasCaret": false, "label": "3.5.1 Streams Are Delayed Lists", "nodeData": "3.5.1" }, + { "id": 75, "hasCaret": false, "label": "3.5.2 Infinite Streams", "nodeData": "3.5.2" }, { - "id": 74, - "hasCaret": false, - "label": "3.5.2 Infinite Streams", - "nodeData": "3.5.2" - }, - { - "id": 75, + "id": 76, "hasCaret": false, "label": "3.5.3 Exploiting the Stream Paradigm", "nodeData": "3.5.3" }, { - "id": 76, + "id": 77, "hasCaret": false, "label": "3.5.4 Streams and Delayed Evaluation", "nodeData": "3.5.4" }, { - "id": 77, + "id": 78, "hasCaret": false, "label": "3.5.5 Modularity of Functional Programs and Modularity of Objects", "nodeData": "3.5.5" @@ -484,55 +445,50 @@ ] }, { - "id": 78, + "id": 79, "hasCaret": true, "label": "4 Metalinguistic Abstraction", "nodeData": "4", "childNodes": [ { - "id": 79, + "id": 80, "hasCaret": true, "label": "4.1 The Metacircular Evaluator", "nodeData": "4.1", "childNodes": [ { - "id": 80, + "id": 81, "hasCaret": false, "label": "4.1.1 The Core of the Evaluator", "nodeData": "4.1.1" }, { - "id": 81, + "id": 82, "hasCaret": false, "label": "4.1.2 Representing Components", "nodeData": "4.1.2" }, { - "id": 82, + "id": 83, "hasCaret": false, "label": "4.1.3 Evaluator Data Structures", "nodeData": "4.1.3" }, { - "id": 83, + "id": 84, "hasCaret": false, "label": "4.1.4 Running the Evaluator as a Program", "nodeData": "4.1.4" }, + { "id": 85, "hasCaret": false, "label": "4.1.5 Data as Programs", "nodeData": "4.1.5" }, { - "id": 84, - "hasCaret": false, - "label": "4.1.5 Data as Programs", - "nodeData": "4.1.5" - }, - { - "id": 85, + "id": 86, "hasCaret": false, "label": "4.1.6 Internal Declarations", "nodeData": "4.1.6" }, { - "id": 86, + "id": 87, "hasCaret": false, "label": "4.1.7 Separating Syntactic Analysis from Execution", "nodeData": "4.1.7" @@ -540,25 +496,25 @@ ] }, { - "id": 87, + "id": 88, "hasCaret": true, "label": "4.2 Lazy Evaluation", "nodeData": "4.2", "childNodes": [ { - "id": 88, + "id": 89, "hasCaret": false, "label": "4.2.1 Normal Order and Applicative Order", "nodeData": "4.2.1" }, { - "id": 89, + "id": 90, "hasCaret": false, "label": "4.2.2 An Interpreter with Lazy Evaluation", "nodeData": "4.2.2" }, { - "id": 90, + "id": 91, "hasCaret": false, "label": "4.2.3 Streams as Lazy Lists", "nodeData": "4.2.3" @@ -566,25 +522,20 @@ ] }, { - "id": 91, + "id": 92, "hasCaret": true, "label": "4.3 Nondeterministic Computing", "nodeData": "4.3", "childNodes": [ + { "id": 93, "hasCaret": false, "label": "4.3.1 Search and amb", "nodeData": "4.3.1" }, { - "id": 92, - "hasCaret": false, - "label": "4.3.1 Search and amb", - "nodeData": "4.3.1" - }, - { - "id": 93, + "id": 94, "hasCaret": false, "label": "4.3.2 Examples of Nondeterministic Programs", "nodeData": "4.3.2" }, { - "id": 94, + "id": 95, "hasCaret": false, "label": "4.3.3 Implementing the amb Evaluator", "nodeData": "4.3.3" @@ -592,31 +543,31 @@ ] }, { - "id": 95, + "id": 96, "hasCaret": true, "label": "4.4 Logic Programming", "nodeData": "4.4", "childNodes": [ { - "id": 96, + "id": 97, "hasCaret": false, "label": "4.4.1 Deductive Information Retrieval", "nodeData": "4.4.1" }, { - "id": 97, + "id": 98, "hasCaret": false, "label": "4.4.2 How the Query System Works", "nodeData": "4.4.2" }, { - "id": 98, + "id": 99, "hasCaret": false, "label": "4.4.3 Is Logic Programming Mathematical Logic?", "nodeData": "4.4.3" }, { - "id": 99, + "id": 100, "hasCaret": false, "label": "4.4.4 Implementing the Query System", "nodeData": "4.4.4" @@ -626,43 +577,38 @@ ] }, { - "id": 100, + "id": 101, "hasCaret": true, "label": "5 Computing with Register Machines", "nodeData": "5", "childNodes": [ { - "id": 101, + "id": 102, "hasCaret": true, "label": "5.1 Designing Register Machines", "nodeData": "5.1", "childNodes": [ { - "id": 102, + "id": 103, "hasCaret": false, "label": "5.1.1 A Language for Describing Register Machines", "nodeData": "5.1.1" }, { - "id": 103, + "id": 104, "hasCaret": false, "label": "5.1.2 Abstraction in Machine Design", "nodeData": "5.1.2" }, + { "id": 105, "hasCaret": false, "label": "5.1.3 Subroutines", "nodeData": "5.1.3" }, { - "id": 104, - "hasCaret": false, - "label": "5.1.3 Subroutines", - "nodeData": "5.1.3" - }, - { - "id": 105, + "id": 106, "hasCaret": false, "label": "5.1.4 Using a Stack to Implement Recursion", "nodeData": "5.1.4" }, { - "id": 106, + "id": 107, "hasCaret": false, "label": "5.1.5 Instruction Summary", "nodeData": "5.1.5" @@ -670,31 +616,21 @@ ] }, { - "id": 107, + "id": 108, "hasCaret": true, "label": "5.2 A Register-Machine Simulator", "nodeData": "5.2", "childNodes": [ + { "id": 109, "hasCaret": false, "label": "5.2.1 The Machine Model", "nodeData": "5.2.1" }, + { "id": 110, "hasCaret": false, "label": "5.2.2 The Assembler", "nodeData": "5.2.2" }, { - "id": 108, - "hasCaret": false, - "label": "5.2.1 The Machine Model", - "nodeData": "5.2.1" - }, - { - "id": 109, - "hasCaret": false, - "label": "5.2.2 The Assembler", - "nodeData": "5.2.2" - }, - { - "id": 110, + "id": 111, "hasCaret": false, "label": "5.2.3 Instructions and their Execution Functions", "nodeData": "5.2.3" }, { - "id": 111, + "id": 112, "hasCaret": false, "label": "5.2.4 Monitoring Machine Performance", "nodeData": "5.2.4" @@ -702,19 +638,14 @@ ] }, { - "id": 112, + "id": 113, "hasCaret": true, "label": "5.3 Storage Allocation and Garbage Collection", "nodeData": "5.3", "childNodes": [ + { "id": 114, "hasCaret": false, "label": "5.3.1 Memory as Vectors", "nodeData": "5.3.1" }, { - "id": 113, - "hasCaret": false, - "label": "5.3.1 Memory as Vectors", - "nodeData": "5.3.1" - }, - { - "id": 114, + "id": 115, "hasCaret": false, "label": "5.3.2 Maintaining the Illusion of Infinite Memory", "nodeData": "5.3.2" @@ -722,31 +653,31 @@ ] }, { - "id": 115, + "id": 116, "hasCaret": true, "label": "5.4 The Explicit-Control Evaluator", "nodeData": "5.4", "childNodes": [ { - "id": 116, + "id": 117, "hasCaret": false, "label": "5.4.1 The Dispatcher and Basic Evaluation", "nodeData": "5.4.1" }, { - "id": 117, + "id": 118, "hasCaret": false, "label": "5.4.2 Evaluating function applications", "nodeData": "5.4.2" }, { - "id": 118, + "id": 119, "hasCaret": false, "label": "5.4.3 Blocks, Assignments, and Declarations", "nodeData": "5.4.3" }, { - "id": 119, + "id": 120, "hasCaret": false, "label": "5.4.4 Running the Evaluator", "nodeData": "5.4.4" @@ -754,49 +685,49 @@ ] }, { - "id": 120, + "id": 121, "hasCaret": true, "label": "5.5 Compilation", "nodeData": "5.5", "childNodes": [ { - "id": 121, + "id": 122, "hasCaret": false, "label": "5.5.1 Structure of the Compiler", "nodeData": "5.5.1" }, { - "id": 122, + "id": 123, "hasCaret": false, "label": "5.5.2 Compiling Components", "nodeData": "5.5.2" }, { - "id": 123, + "id": 124, "hasCaret": false, "label": "5.5.3 Compiling Applications and Return Statements", "nodeData": "5.5.3" }, { - "id": 124, + "id": 125, "hasCaret": false, "label": "5.5.4 Combining Instruction Sequences", "nodeData": "5.5.4" }, { - "id": 125, + "id": 126, "hasCaret": false, "label": "5.5.5 An Example of Compiled Code", "nodeData": "5.5.5" }, { - "id": 126, + "id": 127, "hasCaret": false, "label": "5.5.6 Lexical Addressing", "nodeData": "5.5.6" }, { - "id": 127, + "id": 128, "hasCaret": false, "label": "5.5.7 Interfacing Compiled Code to the Evaluator", "nodeData": "5.5.7" @@ -805,16 +736,6 @@ } ] }, - { - "id": 128, - "hasCaret": false, - "label": "References", - "nodeData": "references" - }, - { - "id": 129, - "hasCaret": false, - "label": "About the SICP JS Project", - "nodeData": "making-of" - } + { "id": 129, "hasCaret": false, "label": "References", "nodeData": "references" }, + { "id": 130, "hasCaret": false, "label": "About the SICP JS Project", "nodeData": "making-of" } ] diff --git a/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.tsx.snap b/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.tsx.snap index b7ee6e1021..b2f5d4839e 100644 --- a/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.tsx.snap +++ b/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.tsx.snap @@ -65,7 +65,7 @@ exports[`Sicp index page 1`] = `