Skip to content

Instantly share code, notes, and snippets.

View devios1's full-sized avatar

Logan Murray devios1

View GitHub Profile
@devios1
devios1 / HashSet.swift
Last active January 26, 2017 16:12 — forked from andelf/HashSet.swift
Modified version of andelf/HashSet.swift that includes a proper == implementation as well as -=.
import Foundation
struct HashSet<T : Hashable> {
typealias Element = T
var _map: Dictionary<T, ()> = [:]
var count: Int {
return _map.count
}