A small typed slot map with opaque handles and reusable slots for MoonBit.
///|
test {
let slots : SlotMap[Int] = SlotMap()
let id = slots.allocate()
slots[id] = 42
inspect(slots[id], content="42")
slots.free(id)
let reused = slots.allocate()
inspect(id == reused, content="false")
slots[reused] = 7
inspect(slots[reused], content="7")
}type SlotMap[T]A small typed slot map with opaque handles and reusable slots for MoonBit.