addElem method

Adds a SubstratePathElem to the path and returns a new SubstratePath instance.

Implementation

SubstratePath addElem(SubstratePathElem elem) {
  return SubstratePath([...elems, elem]);
}