I wrote a macro for creating a record
(defmacro def-entity [name & value]
`(do
(defrecord ~name (vector ~@value))
))
and I created one entity
(def-entity p a b)
But when I try to create a concrete instance (def something (p. "a" "b")) I get this message java.lang.IllegalArgumentException: No matching ctor found for class user.p (repl-1:40). So I have to provide 3 parameters, like this (def someone (p. "a" "b" "x")) And it puts the values like this
(-> someone :a)
"b"
(-> neko :p)
nil
I don't seem to understand what is happening?