Skip to content

Instantly share code, notes, and snippets.

@nathankrishnan
Last active April 9, 2017 18:10
Show Gist options
  • Save nathankrishnan/f7f3a6ed1be8bd66d0185df3915140f3 to your computer and use it in GitHub Desktop.
Save nathankrishnan/f7f3a6ed1be8bd66d0185df3915140f3 to your computer and use it in GitHub Desktop.
private func computeHashes(_ value: T) -> [Int] {
return hashFunctions.map({
(hashFunction: (T) -> Int) -> Int in
return abs(hashFunction(value)) % array.count
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment