File: SUBSEQ.html

package info (click to toggle)
acl2 3.1-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 36,712 kB
  • ctags: 38,396
  • sloc: lisp: 464,023; makefile: 5,470; sh: 86; csh: 47; cpp: 25; ansic: 22
file content (27 lines) | stat: -rw-r--r-- 1,648 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<html>
<head><title>SUBSEQ.html  --  ACL2 Version 3.1</title></head>
<body text=#000000 bgcolor="#FFFFFF">
<h2>SUBSEQ</h2>subsequence of a string or list
<pre>Major Section:  <a href="PROGRAMMING.html">PROGRAMMING</a>
</pre><p>

For any natural numbers <code>start</code> and <code>end</code>, where <code>start</code> <code>&lt;=</code>
<code>end</code> <code>&lt;=</code> <code>(length seq)</code>, <code>(subseq seq start end)</code> is the
subsequence of <code>seq</code> from index <code>start</code> up to, but not including,
index <code>end</code>.  <code>End</code> may be <code>nil</code>, which which case it is treated
as though it is <code>(length seq)</code>, i.e., we obtain the subsequence of
<code>seq</code> from index <code>start</code> all the way to the end.
<p>
The <a href="GUARD.html">guard</a> for <code>(subseq seq start end)</code> is that <code>seq</code> is a
true list or a string, <code>start</code> and <code>end</code> are integers (except,
<code>end</code> may be <code>nil</code>, in which case it is treated as <code>(length seq)</code>
for ther rest of this discussion), and <code>0</code> <code>&lt;=</code> <code>start</code> <code>&lt;=</code>
<code>end</code> <code>&lt;=</code> <code>(length seq)</code>.<p>

<code>Subseq</code> is a Common Lisp function.  See any Common Lisp
documentation for more information.  Note:  In Common Lisp the third
argument of <code>subseq</code> is optional, but in ACL2 it is required,
though it may be <code>nil</code> as explained above.
<br><br><br><a href="acl2-doc.html"><img src="llogo.gif"></a> <a href="acl2-doc-index.html"><img src="index.gif"></a>
</body>
</html>