Skip to content

My version of Peter Norvig's Scheme, but in Ruby, with tests.

Notifications You must be signed in to change notification settings

chrislo/chris-lisp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

My Lisp

Introduction

Here’s my (work in progress) interpretation of Peter Norvig’s Scheme. The language of implementation is Ruby, and I’m working in a TDD-style using TestUnit.

Usage

require 'lisp'

# Define the environment. I provide a basic one.
env = Env.new
Env.add_globals(env)

# Eval some lisp code
code = '(define area (lambda (r) (* 3.141592653 (* r r))))'
lisp_eval(parse(code), env)

code = '(area 3)'
lisp_eval(parse(code), env) #=> 28.274333877

About

My version of Peter Norvig's Scheme, but in Ruby, with tests.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages