lst_remove(L;R)

Remove elements from list-value L that are found in list-value R. This function does not remove duplicates that appear multiple times in list-value L from the returned list-value.

Syntax

lst_remove(L;R)

Input

Argument Type Description
L list-value A list-value whose values will be removed according to values found in list-value R
D list-value A list-value whose values will be used to remove values from list-value L

Return Value

Returns a single list-value that contains elements of list L that were not found in list R. The list-value returned preserves any duplicate values in list-value L that did not appear in list-value R.

Example

This example demonstrates how to use lst_remove(L;R) to eliminate elements of a list-value based on the values in another list-value.

<block name="list_funs" list_a="{lst(1 2 3 4 'a')}" list_b="{lst(1 'a' 'b' 'c' 'd' 'a' 'b')}">
  <base table="default.lonely"/>
  <willbe name="lst_remove" label="List Remove" value="'{lst_remove(@list_b;@list_a)}'"/>
</block>

The list-value output from the lst_remove(L;R) function as used above:

Note: The value b appears twice in list-value L and does not appear in list-value R. Therefore, it appears twice in the list-value returned by the function.