Skip to content

Instantly share code, notes, and snippets.

@deleteme
Created October 26, 2009 21:34
Show Gist options
  • Save deleteme/219066 to your computer and use it in GitHub Desktop.
Save deleteme/219066 to your computer and use it in GitHub Desktop.
<SCRIPT LANGUAGE='SCHEME'>(define (eval exp env) (cond ((self-evaluating? exp) exp) ((variable? exp) (lookup-variable-value exp env)) ((quoted? exp) (text-of-quotation exp)) ((assignment? exp) (eval-assignment exp env)) ((definition? exp) (eval-definition exp env)) ((if? exp) (eval-if exp env)) ((lambda? exp) (make-procedure (lambda-parameters exp) (lambda-body exp) env)) ((begin? exp) (eval-sequence (begin-actions exp) env)) ((cond? exp) (eval (cond->if exp) env)) ((application? exp) (apply (eval (operator exp) env) (list-of-values (operands exp) env))) (else (error "Common Lisp or Netscape Navigator 4.0+ Required" exp))))</SCRIPT>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment