Cold Help System: Programming: ColdC Reference Manual: Functions: List: union()


LIST union(LIST list1, LIST list2)

This function adds each element of list2 to list1 which does not already exist in list1. Elements which exist more than once in list2 will only be added to list1 once, but duplicate elements in list1 will remain. Examples:

union([2, 3, 4], [4, 5, 4, 6])
=> [2, 3, 4, 5, 6]
union([2, 2, 4, 5], [4, 5, 6, 6, 7])
=> [2, 2, 4, 5, 6, 7])


delete() | insert() | join() | listgraft() | listlen() | replace() | setadd() | setremove() | sublist() | union() | listidx()


the Cold Dark