Hi,
I'm learning how to use Agents and I need some help getting started
with the following code. Some tips and hints would be greatly
appreciated.

I want to start a thread that counts upward, printing a number once
every second.

Here's what I have so far:
The agent state will be a simple integer: (agent 0)

and since the thread is blocking, I need to use send-off instead of
send.

(send-off my_agent #( ... ))

But I need the agent's state to be updated within send-off. How do I
go about doing that?

Thanks a lot for your help
  -Patrick
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to