On Mon, 2011-12-12 at 10:54 -0800, Razvan Rotaru wrote:
> - function returns a value which is a java instance (not possible to
> change here, or at least not from what I see - it needs to be a java
> instance)
> - i need to be able to call some function which gets some values that
> are not part of the java class

You should approach such a need with great trepidation:

[org.jboss.netty/netty "3.2.7.Final"]

(import 'org.jboss.netty.util.internal.ConcurrentIdentityWeakKeyHashMap)

(def ^:private asides (ConcurrentIdentityWeakKeyHashMap.))

(defn function-with-two-return-values [...]
  (let [retval ...]
    (.put asides retval extra-data)
    retval))

(let [x (function-with-two-return-values ...)]
  (prn x)
  (prn (.get asides x)))

-- 
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
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