A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.lispworks.com/documentation/lw70/CLHS/Body/f_cp_seq.htm below:

CLHS: Function COPY-SEQ

CLHS: Function COPY-SEQ Function COPY-SEQ

Syntax:

copy-seq sequence => copied-sequence

Arguments and Values:

sequence---a proper sequence.

copied-sequence---a proper sequence.

Description:

Creates a copy of sequence. The elements of the new sequence are the same as the corresponding elements of the given sequence.

If sequence is a vector, the result is a fresh simple array of rank one that has the same actual array element type as sequence. If sequence is a list, the result is a fresh list.

Examples:

 (setq str "a string") =>  "a string"
 (equalp str (copy-seq str)) =>  true
 (eql str (copy-seq str)) =>  false

Side Effects: None.

Affected By: None.

Exceptional Situations:

Should be prepared to signal an error of type type-error if sequence is not a proper sequence.

See Also:

copy-list

Notes:

From a functional standpoint,

 (copy-seq x) ==  (subseq x 0)
However, the programmer intent is typically very different in these two cases.
Copyright 1996-2005, LispWorks Ltd. All rights reserved.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4