Coder Social home page Coder Social logo

cicada-lang / lambda Goto Github PK

View Code? Open in Web Editor NEW
26.0 3.0 3.0 1.04 MB

An interpreter of lambda calculus.

License: GNU General Public License v3.0

TypeScript 99.83% JavaScript 0.17%
lambda lambda-calculus scheme lisp interpreter lazy-evaluation recursion sexp s-expression s-exp

lambda's Introduction

Lambda Calculus

An interpreter of lambda calculus.

  • Implement call-by-need lazy evaluation.
  • Support direct and indirect recursion.
(define name body)
(define (name arg ...) body)
(import name ... "./file.scm")
(assert-equal exp ...)
(assert-not-equal exp ...)

(lambda (name) ret)
(let ([name exp] ...) body)

Usages

Command line tool

Install it by the following command:

npm install -g @cicada-lang/lambda

The command-line program is called lambda.

Development

npm install     # Install dependencies
npm run build   # Compile `src/` to `lib/`
npm run test    # Run test

Contributions

To make a contribution, fork this project and create a pull request.

Please read the STYLE-GUIDE.md before you change the code.

Remember to add yourself to AUTHORS. Your line belongs to you, you can write a little introduction to yourself but not too long.

License

GPLv3

lambda's People

Contributors

xieyuheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

lambda's Issues

[idea] graph-based implementation of lambda calculus

Normal forms of Parigot numerals are exponential in size,
but a reasonable term-graph implementation
should be able to keep them linear via sharing.

Implement lamping reduction by inet.

After this, we can use lambda encoding for real.

After using lambda encoding for real,
maybe we can get better understanding of inductive datatype

For example, parameters v.s. indexes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.