Skip to content

Instantly share code, notes, and snippets.

@bryanl
Created November 19, 2012 18:33
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 bryanl/4112597 to your computer and use it in GitHub Desktop.
Save bryanl/4112597 to your computer and use it in GitHub Desktop.
(def next-person-id (let [count (ref 0)] #(dosync (alter count inc))))
(defn new-birth-event []
(-> BirthEvent (next-person-id) 0))
java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IFn
at dsim.core$new_birth_event.invoke (core.clj:21)
dsim.core$eval2896.invoke (NO_SOURCE_FILE:1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment