Skip to content
 
 

Latest commit

 

History

220 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

SICP in TypeScript

This folder contains the TypeScript implementation of examples and exercises from the book "Structure and Interpretation of Computer Programs" (SICP).

Attribution

The code in this directory is based on the Scheme implementations provided by Ivan Jovanović.

Project Structure

The code is organized by chapters and sections corresponding to the book:

  • 1.x: Building Abstractions with Procedures
  • 2.x: Building Abstractions with Data
  • 3.x: Modularity, Objects, and State
  • 4.x: Metalinguistic Abstraction
  • 5.x: Computing with Register Machines

Getting Started

Prerequisites

Installation

cd typescript
npm install

Running Tests

We use Vitest for testing. To run all tests:

npm test

Implementation Notes

While Scheme is a functional Lisp dialect, this port attempts to capture the core concepts of SICP using TypeScript's features, including:

  • First-class functions and closures
  • Higher-order procedures
  • Data abstraction using types and classes
  • Streams and lazy evaluation (simulated using closures)
  • Concurrency primitives (simulated using Promises)

About

Structure and Interpretation of Computer Programs study notes with exercise solutions, in typescript

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages