Suppose I define a record called Node: (defrecord Node [tag attributes children])
.
After this definition, according to the docstring of defrecord
a factory function called ->Node
is defined, as well as another factory function map->Node
and a Java class constructor Node.
.
I'm wondering what exactly the difference is between the positional factory function ->Node
and the constructor Node.
, apart from the normal differences between a Java class constructor / method on the one hand and a clojure function on the other (by normal differences I'm thinking things like the fact that functions are first-class in Clojure while methods are not).