janestreet / base

Standard library for OCaml
MIT License
860 stars 125 forks source link

Add remove_duplicates function to the list module. #156

Closed Ameen2000 closed 1 year ago

Ameen2000 commented 1 year ago

Noticed that the List module had many useful functions that deals with duplicate elements in lists such as contains_dup, find_dup, and remove_consecutive_duplicates. However, there was no remove_duplicates function that eliminates any duplicate from the list while maintaining the same order of the list. So, I added one.

bcc32 commented 1 year ago

Closed for the same reason as #155.