I\'m learning how to extend Java classes in Clojure, but I don\'t see a way declare new member variables; I only see a way for methods.
(ns test.aclass
(:g
:state name
If supplied, a public final instance field with the given name will be created. You must supply an :init function in order to provide a value for the state. Note that, though final, the state can be a ref or agent, supporting the creation of Java objects with transactional or asynchronous mutation semantics.
There is an example on the website of how it can be used.