List Distinct
The list::distinct
function removes duplicate elements from a list, returning a list of unique elements.
Syntax
list::distinct(<list>)
Parameters
list
: The input list from which duplicates will be removed.
Returns
- List: A new list containing only unique elements from the input list.
Example
list::distinct([1, 2, 2, 3, 4, 4, 5])
This function is useful for cleaning data and ensuring all elements in a list are unique.