Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 504 Bytes

Sequence.md

File metadata and controls

23 lines (18 loc) · 504 Bytes

#To array
#To-set

func toArray() -> [Element] {
        var arr = [Element]()
        forEach { arr.append($0) }
        return arr
    }
extension Sequence where Element: Hashable {
    func toSet() -> Set<Element> {
        return Set(self)
    }
}