<head><title>ColdC: Function/Method Reference: union()</title></head> <body> <h1 align=center><a href="/ColdC/">ColdC</a>: <a href="/ColdC/Functions/">Function/Method Reference</a>: union()</h1> <hr> <p> <font size=+1><i>LIST</i> <b>union</b>(<i>LIST <b>list</b>, LIST <b>list2</b></i>)</font> <p>This function adds each element of <var>list2</var> which does not already exist in <var>list</var> to <var>list</var> and returns the result. Elements which exist more than once in <VAR>list2</VAR> will only be added to <var>list</var> once, but duplicate elements in <VAR>list1</VAR> will remain. <P>Examples: <blockquote> <PRE> 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]) </PRE> </blockquote> <p><hr size=4><p align=center><i>Last Modified on 24 Mar 1996</i> <br><i>Copyright © 1995, 1996, Brandon Gillespie</i> </body>