PasteRack.org
Paste # 90866
2017-06-13 04:54:44

Fork as a new paste.

Paste viewed 33 times.


Embed:

  1. #lang racket
  2. (define x 0)
  3.  
  4. (define closure (lambda () x))
  5. (define promise (delay x))
  6.  
  7. (closure)
  8. (force promise)
  9.  
  10. (define x 1)
  11.  
  12. (closure)
  13. (force promise)

=>

0

0

1

0