Each molecule consists of one or more attributes that can have values or expressions applied.
The arity of a molecule is determined by the number of attributes that will return data when the
molecule is queried against the Datomic database. Attributes returning data are called "output attributes".

Composite molecules

Composite molecules model entities with attributes from different namespaces that are
not necessarily related. Each group of attributes is modelled by a molecule and these
"sub-molecules" are tied together with ~ methods to form a composite molecule.

Composite input molecules

Composite input molecules awaiting 3 inputs have 3 attributes with ? applied to mark that
it awaits inputs at runtime for those attributes. Once the input molecule has been resolved
with inputs, a normal molecule is returned that we can query against the Datomic database.

For brevity, only arity 1 and 2 method signatures are shown. Arity 3-22 follow the same pattern.

The builder pattern is used to add one or more attributes to an initial namespace
like Person from the example below. Further non-related attributes can be tied together
with the ~ method to form "composite molecules" that is basically just attributes
sharing the same entity id.

Applying the ? marker to attributes changes the semantics of the composite
molecule to become a "composite input molecule" that awaits input at runtime for the
attributes marked with ?.

Once the composite input molecule models the desired data structure and has been resolved with input
we can call various actions on it, like get that retrieves matching data from the database.

Composite molecules of arity 2 has two sub-molecules with output attribute(s). If a sub-molecule
has multiple output attributes, a tuple is returned, otherwise just the single value. The two
groups of either a single type or tuple are then tied together in an outer composite tuple:

The builder pattern is used to add one or more attributes to an initial namespace
like Person from the example below. Further non-related attributes can be tied together
with the ~ method to form "composite molecules" that is basically just attributes
sharing the same entity id.

Applying the ? marker to attributes changes the semantics of the composite
molecule to become a "composite input molecule" that awaits input at runtime for the
attributes marked with ?.

Once the composite input molecule models the desired data structure and has been resolved with input
we can call various actions on it, like get that retrieves matching data from the database.