Skip to content

Commit bb9e256

Browse files
committed
Temporary fix to Hustle notes.
1 parent 2ec898a commit bb9e256

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

www/notes/hustle.scrbl

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,10 @@ where the input program itself uses @racket[quote] we will see this
205205
kind of double quotation, and we are calling @racket[parse] with
206206
a two-element list as the argument:
207207

208+
@margin-note{FIXME: langs needs to be update to parse this correctly.}
209+
208210
@ex[
209-
(parse ''5)]
211+
(eval:error (parse ''5))]
210212

211213
This is saying that the input program was @racket['5]. Notice that it
212214
gets parsed the same as @racket[5] by our parser.
@@ -227,9 +229,11 @@ talking about the expression @racket['()], so this gets parsed as
227229

228230
It works similarly for pairs:
229231

232+
@margin-note{FIXME: langs needs to be update to parse second example correctly.}
233+
230234
@ex[
231235
(eval:error (parse '(1 . 2)))
232-
(parse ''(1 . 2))]
236+
(eval:error (parse ''(1 . 2)))]
233237

234238
While these examples can be a bit confusing at first, implementing
235239
this behavior is pretty simple. If the input is a
@@ -275,14 +279,16 @@ Using their Racket counterparts of course!
275279

276280
@codeblock-include["hustle/interp-prim.rkt"]
277281

282+
@margin-note{FIXME}
283+
278284
We can try it out:
279285

280286
@ex[
281287
(interp (parse '(cons 1 2)))
282288
(interp (parse '(car (cons 1 2))))
283289
(interp (parse '(cdr (cons 1 2))))
284-
(interp (parse '(car '(1 . 2))))
285-
(interp (parse '(cdr '(1 . 2))))
290+
(eval:error (interp (parse '(car '(1 . 2)))))
291+
(eval:error (interp (parse '(cdr '(1 . 2)))))
286292
(interp (parse '(let ((x (cons 1 2)))
287293
(+ (car x) (cdr x)))))
288294
]

0 commit comments

Comments
 (0)