mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
Locations manifest, reorganized instances settings
This commit is contained in:
8
Extensions/Sequence+Unique.swift
Normal file
8
Extensions/Sequence+Unique.swift
Normal file
@@ -0,0 +1,8 @@
|
||||
import Foundation
|
||||
|
||||
extension Sequence where Iterator.Element: Hashable {
|
||||
func unique() -> [Iterator.Element] {
|
||||
var seen: Set<Iterator.Element> = []
|
||||
return filter { seen.insert($0).inserted }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user