On Fri, Jan 28, 2011 at 6:13 PM, Andy Fingerhut <andy.finger...@gmail.com> wrote:
>> (ns andy.try >> (:gen-class)) >> >> (gen-class >> :name andy.try.ReversibleByteArray >> :prefix rba-) I find it confusing that you have both of ":gen-class in the ns macro" (I guess you're using this to get -main) and "(gen-class) at the top level". The class you are creating extends no interfaces and defines no methods. (Note, the only reason that you get a "main" method in one of your generated classes is because the :gen-class option to ns automatically specifies (:main true). If you add (:methods [[reverse [] void]) to your gen-class statement, it will add a reverse method to the generated class which calls your rba-reverse function and returns void. I would look into combining the two gen-classes though. Here's a great blog post that goes into gen-class some more: http://kotka.de/blog/2010/02/gen-class_how_it_works_and_how_to_use_it.html --Aaron -- 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