Remove duplicate elements: Difference between revisions
→ATS2 implementation for values having an equality or equivalence predicate
Line 557:
This method runs better than O(n*n) in the number of elements. It is an example of the brute-force technique.
The implementation is for non-linear types, only. I implement the predicate as a non-linear closure.
<syntaxhighlight lang="ats">
|