Landin library reference source

core/vec/used.ldn

1import core/mem
2
3--- Lend a mutable slice covering only initialized items. End uses before any
4--- operation that relocates or releases backing.
5---
6--- Only initialized elements are exposed. The descriptor derives from the
7--- list; changing capacity or releasing storage requires ending that view.
8public used: (item: type, value: list(item))
9             -> (items: []mut item from value) =
10    items = mem.used(value.values)
11end used