mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
15 lines
329 B
Text
15 lines
329 B
Text
interface Box
|
|
exposes [box, unbox]
|
|
imports []
|
|
|
|
box : a -> Box a
|
|
unbox : Box a -> a
|
|
|
|
# # we'd need reset/reuse for box for this to be efficient
|
|
# # that is currently not implemented
|
|
# map : Box a, (a -> b) -> Box b
|
|
# map = \boxed, transform =
|
|
# boxed
|
|
# |> Box.unbox
|
|
# |> transform
|
|
# |> Box.box
|