mutate
Applies pointer-based mutations to this YamlMap within block, returning a new YamlMap.
The original is unchanged; the result is a freshly constructed YamlMap that reflects every assignment and removal performed inside the DSL block. Entries of the original whose keys are not net.mamoe.yamlkt.YamlLiteral are not visible through the mutation scope and are not present in the result. See KpaStructMutationScope for the available to and remove operations.
Return
A new YamlMap with the mutations applied.
Parameters
A lambda with KpaStructMutationScope as receiver.
Applies pointer-based mutations to this YamlList within block, returning a new YamlList.
The original is unchanged; the result is a freshly constructed YamlList that reflects every assignment and removal performed inside the DSL block. See KpaListMutationScope for the available to and remove operations.
Return
A new YamlList with the mutations applied.
Parameters
A lambda with KpaListMutationScope as receiver.