The OpenD Programming Language

SList.linearRemoveElement

Removes the first occurence of an element from the list in linear time.

struct SList(T)
bool
linearRemoveElement
()
if (
!is(T == shared)
)

Parameters

value T

value of the node to be removed

Complexity: O(n)

Return Value

Type: bool

True if the element existed and was successfully removed, false otherwise.

Meta