Remove duplicate elements: Difference between revisions
Content added Content deleted
(Added PicoLisp) |
|||
Line 546: | Line 546: | ||
<lang php>$list = array(1, 2, 3, 'a', 'b', 'c', 2, 3, 4, 'b', 'c', 'd'); |
<lang php>$list = array(1, 2, 3, 'a', 'b', 'c', 2, 3, 4, 'b', 'c', 'd'); |
||
$unique_list = array_unique($list);</lang> |
$unique_list = array_unique($list);</lang> |
||
=={{header|PicoLisp}}== |
|||
There is a built-in function |
|||
<lang PicoLisp>(uniq (2 4 6 1 2 3 4 5 6 1 3 5))</lang> |
|||
Output: |
|||
<pre>-> (2 4 6 1 3 5)</pre> |
|||
=={{header|Pop11}}== |
=={{header|Pop11}}== |