const idx = items.indexOf(x)
if (idx !== -1) items.splice(idx, 1)
(let [[n m]
(split-with (partial not= x) items)]
(concat n (rest m)))
items = items.remove(items.countUntil!(a => a == x));
integer, dimension(:), allocatable :: items
i = findloc(items, x)
if (i /= 0) items = [items(1:i-1), items(i+1:)]
func removeFirstByValue[S ~[]T, T comparable](items *S, x T) {
for i, y := range *items {
if y == x {
*items = slices.Delete(*items, i, i+1)
return
}
}
}
for i, y := range items {
if y == x {
items = append(items[:i], items[i+1:]...)
break
}
}
func removeFirstByValue[S ~[]T, T comparable](items *S, x T) {
if i := slices.Index(*items, x); i != -1 {
*items = slices.Delete(*items, i, i+1)
}
}
for i, y := range items {
if y == x {
copy(items[i:], items[i+1:])
items[len(items)-1] = nil
items = items[:len(items)-1]
break
}
}
items.stream().findFirst().filter(item -> "x".equals(item)).ifPresent(removeIndex -> items.remove(removeIndex));
T value;
for(int index = 0; index < items.size(); index++) {
value = items.get(index);
if(value.equals(x)) {
items.remove(index);
break;
}
}
<T> void remove(List<T> items, T x) {
Iterator<T> i = items.listIterator();
while (i.hasNext())
if (i.next() == x) {
i.remove();
break;
}
}
$list_position = array_search($x, $items);
$specific_item = $items[$position];
unset($specific_item);
i := items.IndexOf(x);
if i <> -1 then
items.delete(i);
extract_first_by { $x eq $_ } @items;
i = items.index(x)
items.delete_at(i) unless i.nil?
if let Some(i) = items.iter().position(|item| *item == x) {
items.remove(i);
}