//
//  SequenceExtension.swift
//  
//
//  Created by Thibaut Schmitt on 04/01/2022.
//

import Foundation

extension Sequence where Iterator.Element: Hashable {

     public func unique() -> [Iterator.Element] {
        var seen: [Iterator.Element: Bool] = [:]
        return self.filter { seen.updateValue(true, forKey: $0) == nil }
    }
}
