(index ("make-box" 0) ("make-box-variable" 331) ("make-box-location" 687) ("box?" 1095) ("box-mutable?" 1201) ("box-immutable?" 1331) ("box-variable?" 1468) ("box-location?" 1592) ("box-set!" 1716) ("box-ref" 1898) ("box-location" 2005) ("box-swap!" 2621) ("make-box-variable-closure" 2878) ("make-box-location-closure" 3112) ("box" 3398) ("set-box!" 3530) ("unbox" 3712))
(def (sig (procedure "(make-box [INITIAL [IMMUTABLE? #f]]) -> box" (id make-box))) (p "Returns a " (tt "BOX") " with, optional, initial value " (tt "INITIAL") ".") (p "The " (tt "BOX") " is mutable unless the " (tt "IMMUTABLE?") " argument is " (tt "#t") ".") (p "An attempt to mutate an immutable box will signal an exception."))
(def (sig (syntax "(make-box-variable VARIABLE [IMMUTABLE? #f]) -> box" (id make-box-variable))) (p "Returns a boxed reference to the " (tt "VARIABLE") ", which must be in lexical-scope.") (p "The " (tt "BOX") " is mutable unless the " (tt "IMMUTABLE?") " argument is " (tt "#t") ".") (p "An attempt to mutate an immutable box will signal an exception."))
(def (sig (syntax "(make-box-location TYPE INITIAL-VALUE [IMMUTABLE? #f]) -> box" (id make-box-location))) (p "Returns a boxed reference to a location of " (tt "TYPE") " and " (tt "INITIAL-VALUE") ".") (p "The " (tt "BOX") " is mutable unless the " (tt "IMMUTABLE?") " argument is " (tt "#t") ".") (p "An attempt to mutate an immutable box will signal an exception.") (p "Unavailable in EVALuated source."))
(def (sig (procedure "(box? OBJECT) -> boolean" (id box?))) (p "Is " (tt "OBJECT") " a " (tt "BOX") "?"))
(def (sig (procedure "(box-mutable? OBJECT) -> boolean" (id box-mutable?))) (p "Is " (tt "OBJECT") " a mutable " (tt "BOX") "?"))
(def (sig (procedure "(box-immutable? OBJECT) -> boolean" (id box-immutable?))) (p "Is " (tt "OBJECT") " an immutable " (tt "BOX") "?"))
(def (sig (procedure "(box-variable? OBJECT) -> boolean" (id box-variable?))) (p "Is " (tt "OBJECT") " a boxed variable?"))
(def (sig (procedure "(box-location? OBJECT) -> boolean" (id box-location?))) (p "Is " (tt "OBJECT") " a boxed location?"))
(def (sig (procedure "(box-set! BOX OBJECT)" (id box-set!))) (p "Changes the boxed value of " (tt "BOX") " to " (tt "OBJECT") ". Will signal an exception for an immutable {{BOX}."))
(def (sig (procedure "(box-ref BOX) -> *" (id box-ref))) (p "Returns the boxed value of " (tt "BOX") "."))
(def (sig (procedure "(box-location BOX [WEAK? #f]) -> location" (id box-location))) (p "Returns a " (tt "LOCATION") " object for a boxed variable, location or locatable box. Signals an exception otherwise.") (p "The locative is \"strong\" unless the " (tt "WEAK?") " argument is " (tt "#t") ". The " (tt "WEAK?") " argument is ignored for boxed variables and locations.") (p "The location of a boxed value or boxed location is the box. The location of a boxed variable is the same as " (tt "(location (box-ref BOX))") "; currently the location of a symbol may not be taken.") (p "See " (int-link "Locations") "."))
(def (sig (procedure "(box-swap! BOX FUNC [OBJECT...])" (id box-swap!))) (p "Changes the boxed value of " (tt "BOX") " to " (tt "(FUNC <BOX-VALUE> OBJECT...)") ". Will signal an exception for an immutable " (tt "BOX}. Returns the new value of {{BOX") "."))
(def (sig (procedure "(make-box-variable-closure IMMUTABLE? REF SET) -> box" (id make-box-variable-closure))) (dl (dt (tt "IMMUTABLE?")) (dd (tt "boolean")) (dt (tt "REF")) (dd (tt "(-> *)")) (dt (tt "SET")) (dd (tt "(* -> void)"))))
(def (sig (procedure "(make-box-location-closure IMMUTABLE? REF SET REFLOC) -> box" (id make-box-location-closure))) (dl (dt (tt "IMMUTABLE?")) (dd (tt "boolean")) (dt (tt "REF")) (dd (tt "(-> *)")) (dt (tt "SET")) (dd (tt "(* -> void)")) (dt (tt "REFLOC")) (dd (tt "(-> location)"))))
(def (sig (procedure "(box OBJECT) -> box" (id box))) (p "Returns a mutable " (tt "BOX") " with initial value " (tt "OBJECT") "."))
(def (sig (procedure "(set-box! BOX OBJECT)" (id set-box!))) (p "Changes the boxed value of " (tt "BOX") " to " (tt "OBJECT") ". Will signal an exception for an immutable {{BOX}."))
(def (sig (procedure "(unbox BOX) -> *" (id unbox))) (p "Returns the boxed value of " (tt "BOX") "."))
