Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: e6e8ff2db4
Fetching contributors…

Cannot retrieve contributors at this time

19 lines (12 sloc) 0.476 kB

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'

# I haven't implemented a default environment yet,
# here's a simple one
env = Env.new
env['+'] = Proc.new {|a,b| a + b}

# Eval the lisp code
code = '(+ 1 (+ 1 2))'
lisp_eval(parse(code), env) #=> 4
Jump to Line
Something went wrong with that request. Please try again.