Module list_functions

Source

Functions§

among
predicate which checks if x occurs among elements of y
append
append x to y will return y if x is null
assoc
If a is an association list, then assoc will produce the first pair whose first term is x. Thus it’s a table searching function.
assoc_v
If y is a list of the form ((u1, v1 ), ..., (un, vn)) and x is one of the u’s, then assoc(x, y) is the corresponding v.
pair
returns an association list: list of pairs of corresponding elements of x and y x and y must be both of the same type: either both lists or both atoms returns NIL only if both arguments are NIL
pairlis
returns an association list: list of pairs of corresponding elements of x and y appended to the list a x and y must be both of the same type: either both lists or both atoms
sublis
Checks each pair from x, where x is of the form ((u1,v1), ..., (un,vn)) and if a un is found in y then it’s substituted for the corresponding vn.