1
0
Fork 0
cl-sites/ecl.common-lisp.dev/static/manual/Sequences.html

222 lines
15 KiB
HTML
Raw Normal View History

2024-12-24 19:15:49 +01:00
<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.0.3, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Sequences (ECL Manual)</title>
<meta name="description" content="Sequences (ECL Manual)">
<meta name="keywords" content="Sequences (ECL Manual)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="index.html" rel="start" title="Top">
<link href="Indexes.html" rel="index" title="Indexes">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Standards.html" rel="up" title="Standards">
<link href="Hash-tables.html#Hash-tables" rel="next" title="Hash tables">
<link href="Strings.html#Strings" rel="prev" title="Strings">
<style type="text/css">
<!--
/* colors */
span.r {font-family: initial; font-weight: normal; font-style: normal}
@media (prefers-color-scheme: dark) {
/* dark theme */
html { color: seashell;
background: #1A1A1A; }
body { background: #1A1A1A; }
th { border-bottom: 2px solid lightgray; }
h1, h2, h3, h4, h5 { background-image: linear-gradient(to left, #202020, #3A3A3A); }
code, var, code a { color: darkorange;
background: #2A2A2A; }
a { color: seashell; }
pre { background: #2A2A2A;
color: seashell;
/* mark longer code block with stripe on the left */
border-left: 5px solid darkorange;
padding-left: 10px; }
pre.screen { background: #2A2A2A;
border: 1px solid lightgray; }
pre.programlisting { background: #2A2A2A;
border-left: 1px solid lightgray;
border-top: 1px solid lightgray; }
/* we need a light background in order for the images to be readable */
img { background: white }
}
@media (prefers-color-scheme: light) {
/* light theme */
html { background: white }
body { background: white }
th { border-bottom: 2px solid gray; }
h1, h2, h3, h4, h5 { background: lightgray; }
code, var, code a { color: darkred;
background: whitesmoke; }
a { color: #000; }
pre { background: whitesmoke;
color: black;
/* mark longer code block with stripe on the left */
border-left: 5px solid darkred;
padding-left: 10px; }
pre.screen { background: #EEE;
border: 1px solid black; }
pre.programlisting { background: #EEEEEE;
border-left: 1px solid black;
border-top: 1px solid black; }
}
body {
margin: 1em 125px 0 10%;
line-height: 1.5em;
padding: 0 2em 1em 2em;
font: 13px Verdana,Arial, sans-serif
}
ul, dd, dl, dt { margin-top: 0; margin-bottom: 0; }
p, code, td, dl, dt {
line-height: 1.5em;
}
table {
font: inherit;
border-collapse: collapse;
}
th, td {
vertical-align: top;
}
h1, h2, h3 { padding-left: 15px; }
h4, h5 { padding-left: 5px; }
code, pre {
font-size: 1em;
font-family: monospace;
}
var {
font-size: 1em;
}
/* links inside code appear the same as the code itself */
code a {
font-weight: normal;
text-decoration: none;
}
/* but get an underline when hovering */
code a:hover {
text-decoration: underline;
}
/* ordinary links appear in bold */
a { font-weight: bold; }
pre.verbatim {
margin: 0 0 0 0;
}
pre {
overflow: auto;
}
pre.screen {
font-weight: bold;
padding: 0.5em;
}
pre.programlisting {
padding: 0.5em;
}
div p { padding: 0 2em }
li p { padding: 0; margin: 0 }
hr { display: none; }
div.funcsynopsis p {
text-indent: -2em;
}
div.variablelist {
padding: 0 2em;
}
.type, .funcsynopsis, .symbol {
font-family: monospace;
}
.type, .symbol, .replaceable {
white-space: nowrap;
}
-->
</style>
</head>
<body lang="en">
<div class="section-level-extent" id="Sequences">
<div class="nav-panel">
<p>
Next: <a href="Hash-tables.html#Hash-tables" accesskey="n" rel="next">Hash tables</a>, Previous: <a href="Strings.html#Strings" accesskey="p" rel="prev">Strings</a>, Up: <a href="Standards.html" accesskey="u" rel="up">Standards</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indexes.html" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="Sequences-1">2.15 Sequences</h3>
<ul class="mini-toc">
<li><a href="Sequences.html#C-Reference-14" accesskey="1">C Reference</a></li>
</ul>
<div class="subsection-level-extent" id="C-Reference-14">
<h4 class="subsection">2.15.1 C Reference</h4>
<ul class="mini-toc">
<li><a href="Sequences.html#ANSI-dictionary-3" accesskey="1">ANSI dictionary</a></li>
</ul>
<div class="subsubsection-level-extent" id="ANSI-dictionary-3">
<h4 class="subsubsection">2.15.1.1 ANSI dictionary</h4>
<p>Common Lisp and C equivalence
</p>
<table class="multitable">
<thead><tr><th width="22%">Lisp symbol</th><th width="78%">C function</th></tr></thead>
<tbody><tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_concat.htm">concatenate</a></td><td width="78%">cl_object cl_concatenate(cl_narg narg, cl_object result_type, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_cp_seq.htm">copy-seq</a></td><td width="78%">cl_object cl_copy_seq(cl_object sequence)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_countc.htm">count</a></td><td width="78%">cl_object cl_count(cl_narg narg, cl_object item, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_countc.htm">count-if</a></td><td width="78%">cl_object cl_count_if(cl_narg narg, cl_object predicate, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_countc.htm">count-if-not</a></td><td width="78%">cl_object cl_count_if_not(cl_narg narg, cl_object predicate, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_rm_rm.htm">delete</a></td><td width="78%">cl_object cl_delete(cl_narg narg, cl_object item, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_rm_rm.htm">delete-if</a></td><td width="78%">cl_object cl_delete_if(cl_narg narg, cl_object test, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_rm_rm.htm">delete-if-not</a></td><td width="78%">cl_object cl_delete_if_not(cl_narg narg, cl_object test, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_rm_dup.htm">delete-duplicates</a></td><td width="78%">cl_object cl_delete_duplicates(cl_narg narg, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_elt.htm">elt</a></td><td width="78%">cl_object cl_elt(cl_object sequence, cl_object index)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_elt.htm">(setf elt)</a></td><td width="78%">cl_object si_elt_set(cl_object sequence, cl_object index, cl_object value)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_fill.htm">fill</a></td><td width="78%">cl_object cl_fill(cl_narg narg, cl_object sequence, cl_object item, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_find_.htm">find</a></td><td width="78%">cl_object cl_find(cl_narg narg, cl_object item, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_find_.htm">find-if</a></td><td width="78%">cl_object cl_find_if(cl_narg narg, cl_object predicate, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_find_.htm">find-if-not</a></td><td width="78%">cl_object cl_find_if_not(cl_narg narg, cl_object predicate, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_length.htm">length</a></td><td width="78%">cl_object cl_length(cl_object x)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_mk_seq.htm">make-sequence</a></td><td width="78%">cl_object cl_make_sequence(cl_narg narg, cl_object result_type, cl_object size, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_map.htm">map</a></td><td width="78%">cl_object cl_map(cl_narg narg, cl_object result_type, cl_object function, , ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_map_in.htm">map-into</a></td><td width="78%">cl_object cl_map_into(cl_narg narg, cl_object result_sequence, cl_object function, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_merge.htm">merge</a></td><td width="78%">cl_object cl_merge(cl_narg narg, cl_object result_type, cl_object sequence1, cl_object sequence2, cl_object predicate, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_mismat.htm">mismatch</a></td><td width="78%">cl_object cl_mismatch(cl_narg narg, cl_object sequence1, cl_object sequence2, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_revers.htm">nreverse</a></td><td width="78%">cl_object cl_nreverse(cl_object sequence)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_sbs_s.htm">nsubstitute</a></td><td width="78%">cl_object cl_nsubstitute(cl_narg narg, cl_object newitem, cl_object olditem, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_sbs_s.htm">nsubstitute-if</a></td><td width="78%">cl_object cl_nsubstitute_if(cl_narg narg, cl_object newitem, cl_object predicate, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_sbs_s.htm">nsubstitute-if-not</a></td><td width="78%">cl_object cl_nsubstitute_if_not(cl_narg narg, cl_object newitem, cl_object predicate, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_pos_p.htm">position</a></td><td width="78%">cl_object cl_position(cl_narg narg, cl_object item, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_pos_p.htm">position-if</a></td><td width="78%">cl_object cl_position_if(cl_narg narg, cl_object predicate, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_pos_p.htm">position-if-not</a></td><td width="78%">cl_object cl_position_if_not(cl_narg narg, cl_object predicate, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_reduce.htm">reduce</a></td><td width="78%">cl_object cl_reduce(cl_narg narg, cl_object function, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_rm_rm.htm">remove</a></td><td width="78%">cl_object cl_remove(cl_narg narg, cl_object item, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_rm_rm.htm">remove-if</a></td><td width="78%">cl_object cl_remove_if(cl_narg narg, cl_object test, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_rm_rm.htm">remove-if-not</a></td><td width="78%">cl_object cl_remove_if_not(cl_narg narg, cl_object test, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_rm_dup.htm">remove-duplicates</a></td><td width="78%">cl_object cl_remove_duplicates(cl_narg narg, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_replac.htm">replace</a></td><td width="78%">cl_object cl_replace(cl_narg narg, cl_object sequence1, cl_object sequence2, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_revers.htm">reverse</a></td><td width="78%">cl_object cl_reverse(cl_object sequence)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_search.htm">search</a></td><td width="78%">cl_object cl_search(cl_narg narg, cl_object sequence1, cl_object sequence2, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_sort_.htm">sort</a></td><td width="78%">cl_object cl_sort(cl_narg narg, cl_object sequence, cl_object predicate, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_sort_.htm">stable-sort</a></td><td width="78%">cl_object cl_stable_sort(cl_narg narg, cl_object sequence, cl_object predicate, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_subseq.htm">subseq</a></td><td width="78%">cl_object cl_subseq(cl_narg narg, cl_object sequence, cl_object start, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_sbs_s.htm">substitute</a></td><td width="78%">cl_object cl_substitute(cl_narg narg, cl_object newitem, cl_object olditem, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_sbs_s.htm">substitute-if</a></td><td width="78%">cl_object cl_substitute_if(cl_narg narg, cl_object newitem, cl_object predicate, cl_object sequence, ...)</td></tr>
<tr><td width="22%"><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_sbs_s.htm">substitute-if-not</a></td><td width="78%">cl_object cl_substitute_if_not(cl_narg narg, cl_object newitem, cl_object predicate, cl_object sequence, ...)</td></tr>
</tbody>
</table>
</div>
</div>
</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="Hash-tables.html#Hash-tables" accesskey="n" rel="next">Hash tables</a>, Previous: <a href="Strings.html#Strings" accesskey="p" rel="prev">Strings</a>, Up: <a href="Standards.html" accesskey="u" rel="up">Standards</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indexes.html" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>