1
0
Fork 0
cl-sites/HyperSpec-7-0/HyperSpec/Body/17_a.htm
2024-04-01 10:24:07 +02:00

52 lines
7.4 KiB
HTML

<!-- Common Lisp HyperSpec (TM), version 7.0 generated by Kent M. Pitman on Mon, 11-Apr-2005 2:31am EDT -->
<HTML>
<HEAD>
<TITLE>CLHS: Section 17.1</TITLE>
<LINK HREF="../Data/clhs.css" REL="stylesheet" TYPE="text/css" />
<META HTTP-EQUIV="Author" CONTENT="Kent M. Pitman">
<META HTTP-EQUIV="Organization" CONTENT="LispWorks Ltd.">
<LINK REL=TOP HREF="../Front/index.htm">
<LINK REL=COPYRIGHT HREF="../Front/Help.htm#Legal">
<LINK REL=DISCLAIMER HREF="../Front/Help.htm#Disclaimer">
<LINK REL=PREV HREF="17_.htm">
<LINK REL=UP HREF="17_.htm">
<LINK REL=NEXT HREF="17_aa.htm">
</HEAD>
<BODY>
<H1><A REV=MADE HREF="http://www.lispworks.com/"><IMG WIDTH=80 HEIGHT=65 ALT="[LISPWORKS]" SRC="../Graphics/LWSmall.gif" ALIGN=Bottom></A><A REL=TOP HREF="../Front/index.htm"><IMG WIDTH=237 HEIGHT=65 ALT="[Common Lisp HyperSpec (TM)]" SRC="../Graphics/CLHS_Sm.gif" ALIGN=Bottom></A> <A REL=PREV HREF="17_.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="17_.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="17_aa.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
<HR>
<H2>
17.1 Sequence Concepts</H2> <P>
A <A REL=DEFINITION HREF="26_glo_s.htm#sequence"><I>sequence</I></A> is an ordered collection of <A REL=DEFINITION HREF="26_glo_e.htm#element"><I>elements</I></A>, implemented as either a <A REL=DEFINITION HREF="26_glo_v.htm#vector"><I>vector</I></A> or a <A REL=DEFINITION HREF="26_glo_l.htm#list"><I>list</I></A>. <P>
<A REL=DEFINITION HREF="26_glo_s.htm#sequence"><I>Sequences</I></A> can be created by the <A REL=DEFINITION HREF="26_glo_f.htm#function"><I>function</I></A> <A REL=DEFINITION HREF="f_mk_seq.htm#make-sequence"><B>make-sequence</B></A>, as well as other <A REL=DEFINITION HREF="26_glo_f.htm#function"><I>functions</I></A> that create <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>objects</I></A> of <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>types</I></A> that are <A REL=DEFINITION HREF="26_glo_s.htm#subtype"><I>subtypes</I></A> of <A REL=DEFINITION HREF="t_seq.htm#sequence"><B>sequence</B></A> (e.g., <A REL=DEFINITION HREF="f_list_.htm#list"><B>list</B></A>, <A REL=DEFINITION HREF="f_mk_lis.htm#make-list"><B>make-list</B></A>, <A REL=DEFINITION HREF="f_mapc_.htm#mapcar"><B>mapcar</B></A>, and <A REL=DEFINITION HREF="f_vector.htm#vector"><B>vector</B></A>). <P>
A <A REL=DEFINITION HREF="26_glo_s.htm#sequence_function"><I>sequence function</I></A> is a <A REL=DEFINITION HREF="26_glo_f.htm#function"><I>function</I></A> defined by this specification or added as an extension by the <A REL=DEFINITION HREF="26_glo_i.htm#implementation"><I>implementation</I></A> that operates on one or more <A REL=DEFINITION HREF="26_glo_s.htm#sequence"><I>sequences</I></A>. Whenever a <A REL=DEFINITION HREF="26_glo_s.htm#sequence_function"><I>sequence function</I></A> must construct and return a new <A REL=DEFINITION HREF="26_glo_v.htm#vector"><I>vector</I></A>, it always returns a <A REL=DEFINITION HREF="26_glo_s.htm#simple_vector"><I>simple vector</I></A>. Similarly, any <A REL=DEFINITION HREF="26_glo_s.htm#string"><I>strings</I></A> constructed will be <A REL=DEFINITION HREF="26_glo_s.htm#simple_string"><I>simple strings</I></A>. <P>
<A NAME="sequencefunctions"> <PRE>
<A REL=DEFINITION HREF="f_concat.htm#concatenate">concatenate</A> <A REL=DEFINITION HREF="f_length.htm#length">length</A> <A REL=DEFINITION HREF="f_rm_rm.htm#remove">remove</A>
<A REL=DEFINITION HREF="f_cp_seq.htm#copy-seq">copy-seq</A> <A REL=DEFINITION HREF="f_map.htm#map">map</A> <A REL=DEFINITION HREF="f_rm_dup.htm#remove-duplicates">remove-duplicates</A>
<A REL=DEFINITION HREF="f_countc.htm#count">count</A> <A REL=DEFINITION HREF="f_map_in.htm#map-into">map-into</A> <A REL=DEFINITION HREF="f_rm_rm.htm#remove-if">remove-if</A>
<A REL=DEFINITION HREF="f_countc.htm#count-if">count-if</A> <A REL=DEFINITION HREF="f_merge.htm#merge">merge</A> <A REL=DEFINITION HREF="f_rm_rm.htm#remove-if-not">remove-if-not</A>
<A REL=DEFINITION HREF="f_countc.htm#count-if-not">count-if-not</A> <A REL=DEFINITION HREF="f_mismat.htm#mismatch">mismatch</A> <A REL=DEFINITION HREF="f_replac.htm#replace">replace</A>
<A REL=DEFINITION HREF="f_rm_rm.htm#delete">delete</A> <A REL=DEFINITION HREF="f_everyc.htm#notany">notany</A> <A REL=DEFINITION HREF="f_revers.htm#reverse">reverse</A>
<A REL=DEFINITION HREF="f_rm_dup.htm#delete-duplicates">delete-duplicates</A> <A REL=DEFINITION HREF="f_everyc.htm#notevery">notevery</A> <A REL=DEFINITION HREF="f_search.htm#search">search</A>
<A REL=DEFINITION HREF="f_rm_rm.htm#delete-if">delete-if</A> <A REL=DEFINITION HREF="f_revers.htm#nreverse">nreverse</A> <A REL=DEFINITION HREF="f_everyc.htm#some">some</A>
<A REL=DEFINITION HREF="f_rm_rm.htm#delete-if-not">delete-if-not</A> <A REL=DEFINITION HREF="f_sbs_s.htm#nsubstitute">nsubstitute</A> <A REL=DEFINITION HREF="f_sort_.htm#sort">sort</A>
<A REL=DEFINITION HREF="f_elt.htm#elt">elt</A> <A REL=DEFINITION HREF="f_sbs_s.htm#nsubstitute-if">nsubstitute-if</A> <A REL=DEFINITION HREF="f_sort_.htm#stable-sort">stable-sort</A>
<A REL=DEFINITION HREF="f_everyc.htm#every">every</A> <A REL=DEFINITION HREF="f_sbs_s.htm#nsubstitute-if-not">nsubstitute-if-not</A> <A REL=DEFINITION HREF="f_subseq.htm#subseq">subseq</A>
<A REL=DEFINITION HREF="f_fill.htm#fill">fill</A> <A REL=DEFINITION HREF="f_pos_p.htm#position">position</A> <A REL=DEFINITION HREF="f_sbs_s.htm#substitute">substitute</A>
<A REL=DEFINITION HREF="f_find_.htm#find">find</A> <A REL=DEFINITION HREF="f_pos_p.htm#position-if">position-if</A> <A REL=DEFINITION HREF="f_sbs_s.htm#substitute-if">substitute-if</A>
<A REL=DEFINITION HREF="f_find_.htm#find-if">find-if</A> <A REL=DEFINITION HREF="f_pos_p.htm#position-if-not">position-if-not</A> <A REL=DEFINITION HREF="f_sbs_s.htm#substitute-if-not">substitute-if-not</A>
<A REL=DEFINITION HREF="f_find_.htm#find-if-not">find-if-not</A> <A REL=DEFINITION HREF="f_reduce.htm#reduce">reduce</A>
</PRE>
<P><B>Figure 17-1. Standardized Sequence Functions</B></A> <P>
<A REL=CHILD HREF="17_aa.htm"><H2>
17.1.1 General Restrictions on Parameters that must be Sequences</H2></A><P><HR>
<A REL=NAVIGATOR HREF="../Front/StartPts.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Starting Points]" SRC="../Graphics/StartPts.gif" ALIGN=Bottom></A><A REL=TOC HREF="../Front/Contents.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Contents]" SRC="../Graphics/Contents.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Master.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Index]" SRC="../Graphics/Index.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Symbol.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Symbols]" SRC="../Graphics/Symbols.gif" ALIGN=Bottom></A><A REL=GLOSSARY HREF="../Body/26_a.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Glossary]" SRC="../Graphics/Glossary.gif" ALIGN=Bottom></A><A HREF="../Front/X3J13Iss.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Issues]" SRC="../Graphics/Issues.gif" ALIGN=Bottom></A><BR>
<A REL=COPYRIGHT HREF="../Front/Help.htm#Legal"><I>Copyright 1996-2005, LispWorks Ltd. All rights reserved.</I></A><P>
</BODY>
</HTML>