std-remove


Synopsis

(std-remove <x> <lst>) ; remove by value

Description

STD-REMOVE returns a list without all elements that are equal to x. It is used to remove all elements by value in contrast to STD-DELPOS which removes by position. It is not destructive, it always returns a copy.

STD-REMOVE will remove all duplicate elements, STD-DELPOS only one at the given position.

Example

(std-remove 0 '(0 1 2))     => (1 2)
(std-remove -1 '(0 1 2))    => (0 1 2)
(std-remove 0 '(0 1 0 2))   => (1 2)

Arguments

x: any lisp expression.

lst: any proper list.

Return Value

A list.

Side Effects

None.

Module

(std-require 'STDLIST)

Defined in STDLIST