mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
11 lines
258 B
Text
11 lines
258 B
Text
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
|