Types
A box which might (FullBox) or might not (EmptyBox) contain a value
- EmptyBox
-
Represents absence of a value
- FullBox
-
Represents presence of a value
Constructors
Box(x:Any)
Convert anything to Box (always FullBox)
Box(n:Null)
Convert null to Box (always EmptyBox)
Box(a:Arr)
Convert array to a Box. Throws InvalidArgument if length of the array is not 0 or 1.
Box(a:Arr, idx:Any)
Convert array value indexed by the given index
Box(h:Hash, k:Any)
Convert hash value indexed by the given key to a Box
Methods
==(b1:Box, b2:Box)
Compare boxes. Empty boxes and boxes with same content are considered to be equal.