No threads:
(ancestors (class (fn[])))
-> #{java.lang.Runnable java.io.Serializable clojure.lang.AFn
clojure.lang.Obj java.lang.Object clojure.lang.Fn
clojure.lang.AFunction clojure.lang.IObj clojure.lang.IFn
java.util.concurrent.Callable clojure.lang.IMeta java.util.Comparator}
What you are referring to is the fact that functions implement
Callable and Runnable, so that they can trivially play nice with Java
threads if you need them to.
Stu
> Someone correct me if I go wrong here. But, from my understanding,
> every defined function in Clojure is an implementation of a thread?
>
> What is the goal in implementing in this fashion? For example, if I
> am writing in imperative style:
>
> (println "First line")
> (println "Second line")
> (println "Third line")
>
> ...
>
> The operations have to occur synchronously. What does adding Java
> threading add to the mix?
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---