計算機科学のブログ

Structure and Interpretation of Computer Programs: JavaScript Edition

Building Abstractions with Data - Hierarchical Data and the Closure Property - Sequences as Conventional Interfaces - Nested Mappings - flatmap, filter, eight-queens puzzle

Structure and Interpretation of Computer Programs: JavaScript Edition(Harold Abelson(著)、Gerald Jay Sussman(著)、Julie Sussman(著)、The MIT Press)のChapter 2(Building Abstractions with Data)、2.2(Hierarchical Data and the Closure Property)、2.2.3(Sequences as Conventional Interfaces)、Nested Mappings、Exercise 2.42の解答を求めてみる。

Building Abstractions with Data - Hierarchical Data and the Closure Property - Sequences as Conventional Interfaces - Nested Mappings - flatmap, filter, ordered triples, sum

Structure and Interpretation of Computer Programs: JavaScript Edition(Harold Abelson(著)、Gerald Jay Sussman(著)、Julie Sussman(著)、The MIT Press)のChapter 2(Building Abstractions with Data)、2.2(Hierarchical Data and the Closure Property)、2.2.3(Sequences as Conventional Interfaces)、Nested Mappings、Exercise 2.41の解答を求めてみる。

Building Abstractions with Data - Hierarchical Data and the Closure Property - Sequences as Conventional Interfaces - Nested Mappings - flatmap, unique pairs

Structure and Interpretation of Computer Programs: JavaScript Edition(Harold Abelson(著)、Gerald Jay Sussman(著)、Julie Sussman(著)、The MIT Press)のChapter 2(Building Abstractions with Data)、2.2(Hierarchical Data and the Closure Property)、2.2.3(Sequences as Conventional Interfaces)、Nested Mappings、Exercise 2.40の解答を求めてみる。

Building Abstractions with Data - Hierarchical Data and the Closure Property - Sequences as Conventional Interfaces - Sequence Operations - reverse, fold right, fold left

Structure and Interpretation of Computer Programs: JavaScript Edition(Harold Abelson(著)、Gerald Jay Sussman(著)、Julie Sussman(著)、The MIT Press)のChapter 2(Building Abstractions with Data)、2.2(Hierarchical Data and the Closure Property)、2.2.3(Sequences as Conventional Interfaces)、Sequence Operations、Exercise 2.39の解答を求めてみる。

Building Abstractions with Data - Hierarchical Data and the Closure Property - Sequences as Conventional Interfaces - Sequence Operations - accumulation, fold right, fold left, associative law

Structure and Interpretation of Computer Programs: JavaScript Edition(Harold Abelson(著)、Gerald Jay Sussman(著)、Julie Sussman(著)、The MIT Press)のChapter 2(Building Abstractions with Data)、2.2(Hierarchical Data and the Closure Property)、2.2.3(Sequences as Conventional Interfaces)、Sequence Operations、Exercise 2.38の解答を求めてみる。

Building Abstractions with Data - Hierarchical Data and the Closure Property - Sequences as Conventional Interfaces - Sequence Operations - vectors, matrices, dot product, times, transpose

Structure and Interpretation of Computer Programs: JavaScript Edition(Harold Abelson(著)、Gerald Jay Sussman(著)、Julie Sussman(著)、The MIT Press)のChapter 2(Building Abstractions with Data)、2.2(Hierarchical Data and the Closure Property)、2.2.3(Sequences as Conventional Interfaces)、Sequence Operations、Exercise 2.37の解答を求めてみる。

Building Abstractions with Data - Hierarchical Data and the Closure Property - Sequences as Conventional Interfaces - Sequence Operations - accumulate_n, a sequence of sequences

Structure and Interpretation of Computer Programs: JavaScript Edition(Harold Abelson(著)、Gerald Jay Sussman(著)、Julie Sussman(著)、The MIT Press)のChapter 2(Building Abstractions with Data)、2.2(Hierarchical Data and the Closure Property)、2.2.3(Sequences as Conventional Interfaces)、Sequence Operations、Exercise 2.36の解答を求めてみる。

Building Abstractions with Data - Hierarchical Data and the Closure Property - Sequences as Conventional Interfaces - Sequence Operations - accumulate, tree, leaves

Structure and Interpretation of Computer Programs: JavaScript Edition(Harold Abelson(著)、Gerald Jay Sussman(著)、Julie Sussman(著)、The MIT Press)のChapter 2(Building Abstractions with Data)、2.2(Hierarchical Data and the Closure Property)、2.2.3(Sequences as Conventional Interfaces)、Sequence Operations、Exercise 2.35の解答を求めてみる。

Building Abstractions with Data - Hierarchical Data and the Closure Property - Sequences as Conventional Interfaces - Sequence Operations - accumulate, polynomial, Horner's rule

Structure and Interpretation of Computer Programs: JavaScript Edition(Harold Abelson(著)、Gerald Jay Sussman(著)、Julie Sussman(著)、The MIT Press)のChapter 2(Building Abstractions with Data)、2.2(Hierarchical Data and the Closure Property)、2.2.3(Sequences as Conventional Interfaces)、Sequence Operations、Exercise 2.34の解答を求めてみる。

Building Abstractions with Data - Hierarchical Data and the Closure Property - Sequences as Conventional Interfaces - Sequence Operations - accumulate, map, append, length

Structure and Interpretation of Computer Programs: JavaScript Edition(Harold Abelson(著)、Gerald Jay Sussman(著)、Julie Sussman(著)、The MIT Press)のChapter 2(Building Abstractions with Data)、2.2(Hierarchical Data and the Closure Property)、2.2.3(Sequences as Conventional Interfaces)、Sequence Operations、Exercise 2.33の解答を求めてみる。