fork

Function fork 

Source
pub fn fork() -> ForkResult
Expand description

Forks the current agent at the current execution point. The new agent gets the same base agent ID but with a new unique phantom ID. The phantom ID of the forked agent is returned in fork-result on both sides. The newly created agent continues running from the same point, but the return value is going to be different in this agent and the forked agent.