Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
My version of Peter Norvig's Scheme, but in Ruby, with tests.
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
README.rdoc

README.rdoc

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
Something went wrong with that request. Please try again.