SplitScript reference / Map<K, V> / remove
Map<K, V>.remove
Method
Map<K, V>.remove(key: K) -> bool where K: Equatable
Removes the entry for a key when present.
Returns whether an entry was removed. Later entries retain their relative insertion order.
Parameters
key: Key whose entry should be removed.
Effects: mutates the receiver
Runtime behavior: available everywhere; synchronous
Examples
Remove a completed route
let routes = Map.new<String, u32>()
routes["Atrium"] = 12
let removed = routes.remove("Atrium")