Question

How to define a Java named class from Clojure?

Answer

The gen-class macro (or the :gen-class directive in ns) allows you to define Java classes whose method implementations are backed by regular Clojure functions. [Emerick 375]

[^1]: http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/gen-class
[^2]: http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/ns

Learn

Author

xavi

Reviews
Last
next

Students 0