Hi all,

Does this seem like the morally-correct thing for promises to do in the
presence of parameters?

-> (define x (make-parameter 3))
-> (define y (parameterize ((x 4)) (delay (list (x)))))
-> (parameterize ((x 5)) (force y))
'(5)

I was expecting '(4), because I felt that delay should be more like let
than lambda, if you see what I mean. That is, I expected that (delay
expr) and (let ((foo expr)) (delay foo)) should be pretty similar except
for exactly when expr gets evaluated.

Tony
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to