
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>".
24 lines
694 B
Racket
Executable File
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))))))
|