Updated force to recursively force promises.

This commit is contained in:
Justin Ethier 2020-09-15 12:42:02 -04:00
parent 90a483da2b
commit d18b776fa2
2 changed files with 2 additions and 1 deletions

View file

@ -13,6 +13,7 @@ Bug Fixes
- Improved `(scheme lazy)` to allow `force` and `make-promise` to accept an argument of any type. Improved representation of promises to more precisely differentiate them from other objects.
- Add type checking to record type accessor functions. We now raise an error if the passed object is of the wrong record type.
- Fix issues with expanding `cond-expand` expressions in libraries. Previously there would be issues with the expansion if the code needed to be within the context of a `begin`.
- Updated `(scheme lazy)` such that `force` will recursively force promises.
## 0.20 - August 14, 2020

View file

@ -28,7 +28,7 @@
(define force
(lambda (obj)
(if (promise? obj)
((cdr obj))
(force ((cdr obj)))
obj)))
(define-syntax delay