SplitScript reference / Set
Set.remove
Method
Set<T>.remove(value: T) -> bool where T: Equatable
Removes an equal value if it is present.
Returns whether a value was removed. A successful removal invalidates active iteration of this set; removing a missing value does not.
Parameters
value: The value to remove.
Effects: mutates the receiver
Runtime behavior: available everywhere; synchronous
Examples
Forget a visited room
let visited = Set.new<String>()
let wasVisited = visited.remove("Atrium")