Working with structs

Here are some examples working with the Clojure API.

Here I look at various functions based on StuctMaps. The Clojure website says that records are now usually a better option. StructMaps have faster accessors that regular maps.

Here are some examples with defstruct:

Here are some examples with create-struct (pretty much the same):

If you create instances with “struct” instead of “struct-map”, you can list the args in order without the keys.


You’re welcome.