Name

remove — Remove item from term

Synopsis

term remove ( term TERM ,
  integer i );
 

Parameters

term TERM

integer i

Return

term

Description

Remove the i'th value from a term. The first value has the index 1 (!). (The index counting is for compatibility reasons with the 'old' remove which allowed 'remove(`term(1,2,3), 0) = [1,2,3]' Use 'argsof (term) -> list' for this kind of transformation.)

The yast2-core version < 2.17.16 returns nil if the index is invalid. This behavior has changed in version 2.17.16 to return unchanged term.

Usage

  remove (`fun(1, 2), 1) -> `fun(2)
  remove (`VBox(`Label("a"), `Label("b")), 2) -> `VBox (`Label ("a"))