Skip to content

Instantly share code, notes, and snippets.

@KirinDave
Created June 3, 2010 03:42
Show Gist options
  • Select an option

  • Save KirinDave/423416 to your computer and use it in GitHub Desktop.

Select an option

Save KirinDave/423416 to your computer and use it in GitHub Desktop.
(require '(blogpost [bloomfilters :as 'bloom])
; We can do it this way:
(extend-protocol BloomFilterable
MyIntHolder
(make-hash [this] (.data this)) ; return own data
(human-readable-hash [this] (str (.data this)))) ; return a string
; Or perhaps like this:
(extend-type MyIntHolder
bloom/BloomFilterable
(make-hash [this] (.data this))
(human-readable-hash [this] (str (.data this))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment