File r37/lisp/csl/html/r37_0057.html artifact 381e27f1c0 part of check-in 9992369dd3



<A NAME=REST>

<TITLE>REST</TITLE></A>
<b><a href=r37_idx.html>INDEX</a></b><p><p>



<B>REST</B> _ _ _  _ _ _  _ _ _  _ _ _ <B>operator</B><P>
<P>
 
 <P>
<P>
The <em>rest</em> operator returns a 
<A HREF=r37_0053.html>list</A> containing all but the first 
element of the list it is given. 
 <P> <H3> 
syntax: </H3>
<P>
<P>
<em>rest</em>(&lt;list&gt;) or <em>rest</em> &lt;list&gt; 
<P>
<P>
<P>
<P>
&lt;list&gt; must be a non-empty list, but need not have more than one element. 

<P>
<P>
 <P> <H3> 
examples: </H3>
<P><PRE><TT>
alist := {a,b,c,d}; 

  ALIST := {A,B,C,D}; 


rest alist; 

  {B,C,D} 


blist := {x,y,{aa,bb,cc},z}; 

  BLIST := {X,Y,{AA,BB,CC},Z} 


second rest blist; 

  {AA,BB,CC} 


clist := {c}; 

  CLIST := C 


rest clist; 

  {}

</TT></PRE><P>

REDUCE Historical
REDUCE Sourceforge Project | Historical SVN Repository | GitHub Mirror | SourceHut Mirror | NotABug Mirror | Chisel Mirror | Chisel RSS ]