Artifact a9c018287bd988e88127fa658ea01bbd5f8c5834d7869deeec6aabc7b1088c65:
- Executable file
r37/lisp/csl/html/r37_0059.html
— part of check-in
[f2fda60abd]
at
2011-09-02 18:13:33
on branch master
— Some historical releases purely for archival purposes
git-svn-id: https://svn.code.sf.net/p/reduce-algebra/code/trunk/historical@1375 2bfe0521-f11c-4a00-b80e-6202646ff360 (user: arthurcnorman@users.sourceforge.net, size: 1245) [annotate] [blame] [check-ins using] [more...]
<A NAME=REVERSE> <TITLE>REVERSE</TITLE></A> <b><a href=r37_idx.html>INDEX</a></b><p><p> <B>REVERSE</B> _ _ _ _ _ _ _ _ _ _ _ _ <B>operator</B><P> <P> <P> <P> The <em>reverse</em> operator returns a <A HREF=r37_0053.html>list</A> that is the reverse of the list it is given. <P> <H3> syntax: </H3> <P> <P> <em>reverse</em>(<list>) or <em>reverse</em> <list> <P> <P> <P> <list> must be a <A HREF=r37_0053.html>list</A>. <P> <P> <P> <H3> examples: </H3> <P><PRE><TT> aa := {c,b,a,{x**2,z**3},y}; 2 3 AA := {C,B,A,{X ,Z },Y} reverse aa; 2 3 {Y,{X ,Z },A,B,C} reverse(q . reverse aa); 2 3 {C,B,A,{X ,Z },Y,Q} </TT></PRE><P><em>reverse</em>and <A HREF=r37_0043.html>cons</A> can be used together to add a new element to the end of a list (<em>.</em> adds its new element to the beginning). The <em>reverse</em> operator uses a noticeable amount of system resources, especially if the list is long. If you are doing much heavy-duty list manipulation, you should probably design your algorithms to avoid much reversing of lists. A moderate amount of list reversing is no problem. <P> <P> <P>