(clone arg) arg: any type returns any type
F
Returns a shallow copy of its argument.
If arg
is an array, string or table, this function allocates a new, mutable collection,
copies over the original collection's contents, and returns the new collection.
If arg
is an iterator, this function allocates a new iterator, copying just enough
data so that (iter-next! new-iter)
does not mutate the original iterator.
If arg
is an object or RData
with an op-clone
method, this function invokes that method
and returns the result.
For other primitive types, the function simply returns arg
.