On Sat, Sep 27, 2008 at 11:36 AM, Kevin <[EMAIL PROTECTED]> wrote:
>
> I had some difficulty writing the following java code in Clojure:
>
>    Runnable runnable = new Runnable() {
>      public void run() {
>        animate();
>        display.timerExec(TIMER_INTERVAL, this);
>      }
>    };
>    display.timerExec(TIMER_INTERVAL, runnable);

Clojure functions implement Runnable, so you ought to be able to do
something like:

(defn my-run []
  (animate)
  (.timerExec display *timer-interval* my-run))
(.timerExec display *timer-interval* my-run)

That's untested.  Good luck.  :-)
--Chouser

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to