A box can be mutable or immutable. When an immutable box is provided to a procedure like set-box!, the exn:fail:contract exception is raised. Box constants generated by the default reader (see Reading Strings) are immutable. Use immutable? to check whether a box is immutable.
box : (and box? (not/c impersonator?))
box : (and/c box? (not/c immutable?) (not/c impersonator?)) v : any/c
Added in version 126.96.36.199 of package base.
box : (and/c box? (not/c immutable?) (not/c impersonator?)) old : any/c new : any/c
When Racket is compiled with support for futures, box-cas! uses a hardware compare and set operation. Uses of box-cas! be performed safely in a future (i.e., allowing the future thunk to continue in parallel).