Artifact c68a7338146e7617b03b963dd006da7b259c17f6caf45c2be9a8d87fe4bdcfc8:
- Executable file
r37/lisp/csl/html/r37_0053.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: 1579) [annotate] [blame] [check-ins using] [more...]
<A NAME=LIST> <TITLE>LIST</TITLE></A> <b><a href=r37_idx.html>INDEX</a></b><p><p> <B>LIST</B> _ _ _ _ _ _ _ _ _ _ _ _ <B>operator</B><P> <P> <P> <P> The <em>list</em> operator constructs a list from its arguments. <P> <H3> syntax: </H3> <P> <P> <em>list</em>(<item> {,<item>}*) or <em>list</em>() to construct an empty list. <P> <P> <P> <item> can be any REDUCE scalar expression, including another list. Left and right curly brackets can also be used instead of the operator <em>list</em> to construct a list. <P> <P> <P> <H3> examples: </H3> <P><PRE><TT> liss := list(c,b,c,{xx,yy},3x**2+7x+3,df(sin(2*x),x)); 2 LISS := {C,B,C,{XX,YY},3*X + 7*X + 3,2*COS(2*X)} length liss; 6 liss := {c,b,c,{xx,yy},3x**2+7x+3,df(sin(2*x),x)}; 2 LISS := {C,B,C,{XX,YY},3*X + 7*X + 3,2*COS(2*X)} emptylis := list(); EMPTYLIS := {} a . emptylis; {A} </TT></PRE><P>Lists are ordered, hierarchical structures. The elements stay wher e you put them, and only change position in the list if you specifically change them. Lists can have nested sublists to any (reasonable) level. The <A HREF=r37_0169.html>part</A> operator can be used to access elements anywhere within a list hierarchy. The <A HREF=r37_0157.html>length</A> operator counts the number of top-level elements of its list argument; elements that are themselves lists still only count as one element. <P> <P> <P>