CoCoA:List

From ApCoCoAWiki
Revision as of 10:02, 24 October 2007 by XMLBot (talk | contribs) (pushing XML rev. 1.46, again)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

List

convert an expression into a list

Description

This function converts the expression E into a list. It

is the same as Cast(E,LIST).

Example

  Use R ::= Q[x,y];
  M := Jacobian([x^2y^2, x+y]);
  M;
Mat([
  [2xy^2, 2x^2y],
  [1, 1]
])
-------------------------------
  Head(M);

-------------------------------
ERROR: Bad parameters
CONTEXT: Head(M)
-------------------------------
  Head(List(M));
[2xy^2, 2x^2y]
-------------------------------

The error occurs because the function <ttref>Head</ttref> only accepts lists as arguments.

Syntax

List(E:OBJECT):LIST

where E has type LIST, MAT, or VECTOR.

NewList

   <type>list</type>
   <type>matrix</type>
   <type>vector</type>