Box

box : item -> Box(item)

Wraps a value in a generic, opaque representation (box) that can easily be passed to the platform. Boxing is an expensive process because it copies the value from the stack to the heap. This may provide a performance optimization for advanced use cases with large values.

unbox : Box(item) -> item

Unwraps a value from a box. This is the inverse of Box.box, and is also an expensive operation.