unaryMinus

context(incarnation: Incarnation<T, *>, _: Node<T>)
operator fun <T> Molecule.unaryMinus()

Assigns a default concentration for this Molecule to the current Node.

This operator invokes the parameterless molecule invoker, which in turn creates a default concentration via Incarnation.createConcentration and assigns it to the current Node.

Context receivers:

Receiver

the molecule whose default concentration will be set on the current node


context(incarnation: Incarnation<T, *>, _: Node<T>)
operator fun <T> String.unaryMinus()

Create a Molecule using its name and assign a default concentration to the current Node.

This is equivalent to calling the string-based invoker with no explicit concentration and therefore creates and assigns a default concentration via the current Incarnation.

Context receivers:

  • incarnation: used to create the molecule and its default concentration

  • Node: the target node

Receiver

the molecule name to create and set with its default concentration