Skip to content

Instantly share code, notes, and snippets.

@rhz
Created October 22, 2010 17:57
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 rhz/641036 to your computer and use it in GitHub Desktop.
Save rhz/641036 to your computer and use it in GitHub Desktop.
(defrecord Agent [id name states bindings])
(defn a1 [bs ba]
(Agent. 1 :a1 {"x" ""} {"x" [bs (delay (ba "x" a1))]}))
(defn a2 [bs ba]
(Agent. 2 :a2 {"z" ""} {"z" [bs (delay (ba "z" a2))]}))
;; user> (a1 "z" a2) ; why stack overflow?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment