mirror of
				https://github.com/yattee/yattee.git
				synced 2025-11-04 06:32:03 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			9 lines
		
	
	
		
			219 B
		
	
	
	
		
			Swift
		
	
	
	
	
	
			
		
		
	
	
			9 lines
		
	
	
		
			219 B
		
	
	
	
		
			Swift
		
	
	
	
	
	
import Foundation
 | 
						|
 | 
						|
extension Sequence where Iterator.Element: Hashable {
 | 
						|
    func unique() -> [Iterator.Element] {
 | 
						|
        var seen: Set<Iterator.Element> = []
 | 
						|
        return filter { seen.insert($0).inserted }
 | 
						|
    }
 | 
						|
}
 |