Skip to content

Instantly share code, notes, and snippets.

@comnik
Created July 21, 2018 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save comnik/02456326a7fd5e89d61b1a7a05d86ac9 to your computer and use it in GitHub Desktop.
Save comnik/02456326a7fd5e89d61b1a7a05d86ac9 to your computer and use it in GitHub Desktop.
Deterministic mapping w/o carrying state, via memoize.
(def encode-symbol (memoize (fn [sym] (clojure.lang.RT/nextID))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment