clojure.core/gensym¶
Returns a new symbol with a unique name. If a prefix string is supplied, the name is prefix# where # is some unique number. If prefix is not supplied, the prefix is 'G__'.
Examples¶
Note by mlb¶
The
(. clojure.lang.RT (nextID))present gensym's source code (https://github.com/clojure/clojure/blob/clojure-1.5.1/src/jvm/clojure/lang/RT.java#L468) uses java.util.concurrent.atomic.AtomicInteger (and has for the past 6 years, if you trust the Git history).
Content from the matching ClojureDocs page, with authors credited on each contribution.