ecl-logo Documentation

DeleteNestedDuplicates

DeleteNestedDuplicates[list]duplicateFree

deletes repeated non-List items across an arbitrary-depth list of lists such that a flattened version of the input list will contain no duplicates.

Details

    Input
    Output

Examples

Basic Examples  (3)

Delete duplicate non-list elements to arbitrary depth:

Duplicates are ordered depth-first and all but the first instance are removed:

Lists with no duplicate items are returned unmodified:

Additional Examples  (1)

An empty list is left if the last item in a given list is deleted: