summaryrefslogtreecommitdiff
path: root/docsrc/xlisp/xlisp-doc/reference/nthcdr.htm
diff options
context:
space:
mode:
Diffstat (limited to 'docsrc/xlisp/xlisp-doc/reference/nthcdr.htm')
-rw-r--r--docsrc/xlisp/xlisp-doc/reference/nthcdr.htm75
1 files changed, 75 insertions, 0 deletions
diff --git a/docsrc/xlisp/xlisp-doc/reference/nthcdr.htm b/docsrc/xlisp/xlisp-doc/reference/nthcdr.htm
new file mode 100644
index 0000000..fa41dac
--- /dev/null
+++ b/docsrc/xlisp/xlisp-doc/reference/nthcdr.htm
@@ -0,0 +1,75 @@
+<html><head><title>XLISP nthcdr</title>
+
+<link rel="stylesheet" type="text/css" href="reference.css">
+
+</head>
+
+<body>
+
+<a href="../start.htm">Nyquist / XLISP 2.0</a>&nbsp; -&nbsp;
+<a href="../manual/contents.htm">Contents</a> |
+<a href="../tutorials/tutorials.htm">Tutorials</a> |
+<a href="../examples/examples.htm">Examples</a> |
+<a href="reference-index.htm">Reference</a>
+
+<hr>
+
+<h1>nthcdr</h1>
+
+<hr>
+
+<p><table cellpadding="0" cellspacing="0" style="margin-left:10px"><tbody>
+<tr valign="top">
+ <td><nobr>Type:</nobr></td>
+ <td><nobr>&nbsp;&nbsp;-&nbsp;&nbsp;</nobr></td>
+ <td width="100%"><nobr>function (subr)</nobr></td>
+</tr>
+<tr valign="top">
+ <td><nobr>Source:</nobr></td>
+ <td><nobr>&nbsp;&nbsp;-&nbsp;&nbsp;</nobr></td>
+ <td width="100%"><nobr>xllist.c</nobr></td>
+</tr>
+</tbody></table></p>
+
+<h2>Syntax</h2>
+
+<dl>
+<dt>(nthcdr <i>expr list-expr</i>)</dt>
+<dd><i>expr</i> - an integer expression<br>
+<i>list-expr</i> - a list or list expression<br>
+returns - the <a href="nth.htm">nth</a>
+<a href="cdr.htm">cdr</a> or
+<a href="nil.htm">NIL</a> if the list isn't that long</dd>
+</dl>
+
+<h2>Description</h2>
+
+<p>'nthcdr' returns the 'expr'-th <a href="cdr.htm">cdr</a>
+of 'list-expr'. If the 'list-expr' is shorter than 'exp',
+a <a href="nil.htm">NIL</a> is returned. The counting sequence
+is base zero, the first element is the 0th element.</p>
+
+<h2>Examples</h2>
+
+<pre class="example">
+(nthcdr 4 '(0 1 2 3 4 5 6)) <font color="#008844">; returns (4 5 6)</font>
+(nthcdr 3 '(a b)) <font color="#008844">; returns NIL</font>
+
+(nthcdr 4 'a) <font color="#008844">; error: bad argument type</font>
+</pre>
+
+<p>See the
+<a href="../manual/xlisp-man-016.htm#nthcdr">nthcdr</a>
+function in the <nobr>XLISP 2.0</nobr> manual.</p>
+
+<p><nobr>&nbsp;&nbsp;<a href="#top">Back to Top</nobr></a></p>
+
+<hr>
+
+<a href="../start.htm">Nyquist / XLISP 2.0</a>&nbsp; -&nbsp;
+<a href="../manual/contents.htm">Contents</a> |
+<a href="../tutorials/tutorials.htm">Tutorials</a> |
+<a href="../examples/examples.htm">Examples</a> |
+<a href="reference-index.htm">Reference</a>
+
+</body></html> \ No newline at end of file