clone ( obj -- cloned )
Factor handbook > The language > Objects > Equality

Prev:identity-tuple


Vocabulary
kernel

Inputs and outputs
objan object
cloneda new object


Generic word contract
Outputs a new object equal to the given object. This is not guaranteed to actually copy the object; it does nothing with immutable objects, and does not copy words either. However, sequences and tuples can be cloned to obtain a shallow copy of the original.

Definition

GENERIC: clone ( obj -- cloned )


Methods