
Next: Regular Expressions
Up: Programming Constructs
Previous: Hash Tables
A weak box is similar to a normal box (see section
2.7), but a weak box does not keep its contents from being
garbage-collected.
- (make-weak-box v) returns a
new weak box that initially contains v.
- (weak-box-value wb) returns
the value contained in the weak box wb. If the value that was in
wb has already been garbage-collected, then #f is
returned instead.
- (weak-box? wb) returns
#t if wb is a weak box or #f otherwise.
PLT