VocabularysequencesInputsOutputsWord descriptionOutputs a newly-allocated sequence with the same elements as
seq but of the same type as
exemplar.
NotesUnlike
like, this word always creates a new sequence which never shares storage with the original.
ExamplesUSING: prettyprint sequences ;
{ 1 2 3 } V{ } clone-like .
V{ 1 2 3 }
Demonstrating the lack of shared storage:
USING: kernel prettyprint sequences ;
{ 1 2 3 } dup V{ } clone-like reverse! [ . ] bi@
{ 1 2 3 }
V{ 3 2 1 }
DefinitionMethods