title: Observable/toObservable not found as static function?
body: <p>Using rxjava (<a href="http://netflix.github.io/RxJava/javadoc/" rel="nofollow">http://netflix.github.io/RxJava/javadoc/</a>) under lighttable with clojure 1.5.1, consider the following (using a side-effecting, mutating (horrors!) external collector to extract data from the monad)</p>
  
  <pre><code>(ns expt1.core (:import [rx]))
  
  (def ^:private collector (atom []))
  (defn- collect [item]
    (reset! collector (conj @collector item)))
  
  (def string-explode (partial map identity))
  
  (reset! collector [])
  (-&gt;
   (Observable/toObservable ["one" "two" "three"])
   (.mapMany #(Observable/toObservable (string-explode %)))
   (.subscribe collect)
   )
  
  @collector
  </code></pre>
  
  <p>which produces:</p>
  
  <pre><code>[\o \n \e \t \w \o \t \h \r \e \e]
  </code></pre>
  
  <p>I would like to say</p>
  
  <pre><code>(reset! collector [])
  (-&gt;
   (Observable/toObservable ["one" "two" "three"])
   (.mapMany (comp Observable/toObservable string-explode))
   (.subscribe collect)
   )
  </code></pre>
  
  <p>but, surprise</p>
  
  <pre><code>clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: Unable to find static field: toObservable in class rx.Observable, compiling:(NO_SOURCE_PATH:93:1)
               Compiler.java:6380 clojure.lang.Compiler.analyze
               Compiler.java:6322 clojure.lang.Compiler.analyze
               Compiler.java:3624 clojure.lang.Compiler$InvokeExpr.parse
               Compiler.java:6562 clojure.lang.Compiler.analyzeSeq
               ...
  </code></pre>
  
  <p>in fact, just </p>
  
  <pre><code>Observable/toObservable
  </code></pre>
  
  <p>produces a similar exception. Why can Clojure find <code>Observable/toObservable</code> when it's in an expression like </p>
  
  <pre><code>#(Observable/toObservable (string-explode %))
  </code></pre>
  
  <p>but not in an expression like</p>
  
  <pre><code>(comp Observable/toObservable string-explode)
  </code></pre>
  
  <p>?</p>