Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

tninja/sicp-typescript

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

220 Commits
 
 
 
 
 
 
 
 

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

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Scheme 68.3%
  • TypeScript 24.9%
  • Tree-sitter Query 6.8%