File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ everything:
292292@centered{@tt{https://github.com/cmsc430/assign05-test.git}}
293293
294294This repository will evolve as the week goes on, but any time there's
295- a significant update it will be announced on Piazza .
295+ a significant update it will be announced on ELMS .
296296
297297@section[#:tag-prefix " a5-" #:style 'unnumbered]{Submitting}
298298
Original file line number Diff line number Diff line change 1212@(define codeblock-include (make-codeblock-include #'h ))
1313
1414@(for-each (λ (f) (ev `(require (file ,(path->string (build-path notes "knock " f))))))
15- '("interp.rkt " "compile.rkt " "asm/interp.rkt " "asm/printer.rkt " ))
15+ '("interp.rkt " "compile.rkt " "syntax.rkt " " asm/interp.rkt " "asm/printer.rkt " ))
1616
1717@title[#:tag "Knock " ]{Knock: first-class function (pointers)}
1818
@@ -141,26 +141,26 @@ like before:
141141
142142@ex[
143143(asm-interp
144- (compile '(begin (define (f x)
145- (if (zero? x)
146- 0
147- (add1 (call (fun f) (sub1 x)))))
148- (call (fun f) 10 ))))
144+ (compile (sexpr->prog '(begin (define (f x)
145+ (if (zero? x)
146+ 0
147+ (add1 (call (fun f) (sub1 x)))))
148+ (call (fun f) 10 ) ))))
149149]
150150
151151But it also works when functions are put in lists:
152152
153153@ex[
154154(asm-interp
155- (compile '(begin (define (f x) x)
156- (call (car (cons (fun f) '() )) 7 ))))
155+ (compile (sexpr->prog '(begin (define (f x) x)
156+ (call (car (cons (fun f) '() )) 7 ) ))))
157157]
158158
159159And functions that produce functions:
160160
161161@ex[
162162(asm-interp
163- (compile '(begin (define (f x) (fun h))
164- (define (h y) y)
165- (call (call (fun f) 5 ) 9 ))))
166- ]
163+ (compile (sexpr->prog '(begin (define (f x) (fun h))
164+ (define (h y) y)
165+ (call (call (fun f) 5 ) 9 ) ))))
166+ ]
You can’t perform that action at this time.
0 commit comments