Declare Member Variables with gen-class in Clojure -


I'm learning how to expand Java classes in Clojure, but I showed no way to declare a new member variable Does not; I only see a way for the methods.

  (ns test.aclass (: gen-class: methods [[foo [] string]]))  

Does anyone : members Is there another way to declare a keyword or member variable?

If supplied, then a public with the given name The last example field will be created. To provide value to the state, you must supply a: init function. Note that, although the last, the state can be a referee or agent, which supports the creation of Java objects with transactions or asynchronous mutation words.

An example of how it can be used.

P>

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -