API Reference › List › List.remove
method

List.remove

List.remove(s, v) -> void

Scans for the first element equal to v and removes it (shifting the rest down); if no element matches, the slice is unchanged. Comparison is by value for scalars and by identity for reference elements, matching List.contains. Only the first match is removed.

Example

program Demo {
  handler Step phase Update {
    List.remove(active, dead_entity)
  }
}
← All symbols