clone
clone(array)
Creates a shallow copy of array
, unless marked as mutable with markAsMutable
inside a mutation context (see @monstermann/remmi).
ts
clone([1, 2, 3, 4]); // [1, 2, 3, 4]
ts
pipe([1, 2, 3, 4], clone()); // [1, 2, 3, 4]