From: Robert D. <rob...@us...> - 2007-11-15 04:49:49
|
Update of /cvsroot/maxima/maxima/doc/info In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23700 Modified Files: Lists.texi Log Message: Documentation for function "unique". Index: Lists.texi =================================================================== RCS file: /cvsroot/maxima/maxima/doc/info/Lists.texi,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- Lists.texi 12 Jun 2007 21:17:46 -0000 1.32 +++ Lists.texi 15 Nov 2007 04:49:46 -0000 1.33 @@ -396,6 +396,27 @@ @end deffn +@deffn {Function} unique (@var{L}) + +Returns the unique elements of the list @var{L}. + +When all the elements of @var{L} are unique, +@code{unique} returns a shallow copy of @var{L}, +not @var{L} itself. + +If @var{L} is not a list, @code{unique} returns @var{L}. + +Example: + +@c ===beg=== +@c unique ([1, %pi, a + b, 2, 1, %e, %pi, a + b, [1]]); +@c ===end=== +@example +(%i1) unique ([1, %pi, a + b, 2, 1, %e, %pi, a + b, [1]]); +(%o1) [1, 2, %e, %pi, [1], b + a] +@end example +@end deffn + @c NEEDS EXAMPLES @deffn {Function} rest (@var{expr}, @var{n}) @deffnx {Function} rest (@var{expr}) |