racket/collects/tests/eopl/chapter3/lexaddr-lang/environments.rkt
Eli Barzilay 672910f27b Lots of bad TAB eliminations.
I started from tabs that are not on the beginning of lines, and in
several places I did further cleanings.

If you're worried about knowing who wrote some code, for example, if you
get to this commit in "git blame", then note that you can use the "-w"
flag in many git commands to ignore whitespaces.  For example, to see
per-line authors, use "git blame -w <file>".  Another example: to see
the (*much* smaller) non-whitespace changes in this (or any other)
commit, use "git log -p -w -1 <sha1>".
2012-11-07 11:22:20 -05:00

24 lines
694 B
Racket
Executable File

#lang eopl
(require "data-structures.rkt")
(provide init-nameless-env empty-nameless-env extend-nameless-env
apply-nameless-env)
;;;;;;;;;;;;;;;; initial environment ;;;;;;;;;;;;;;;;
;; init-env : () -> Nameless-env
;; (init-env) builds an environment in which i is bound to the
;; expressed value 1, v is bound to the expressed value 5, and x is
;; bound to the expressed value 10.
(define init-nameless-env
(lambda ()
(extend-nameless-env
(num-val 1) ; was i
(extend-nameless-env
(num-val 5) ; was v
(extend-nameless-env
(num-val 10) ; was x
(empty-nameless-env))))))