Number of List Elements



Isn't always the case that one finds what one wants only after one asks the question.  Anyway, length() does the trick, so let me amend my question to ask how would one write the equivalent of length() for oneself.

Again thanks in advance,
Conrad

--- On Tue, 8/24/10, Conrad Schiff <gravmath at yahoo.com> wrote:

> From: Conrad Schiff <gravmath at yahoo.com>
> Subject: Number of List Elements
> To: maxima at math.utexas.edu
> Date: Tuesday, August 24, 2010, 3:39 PM
> Perhaps the function I am looking for
> is to be found in the help files but, if so, it has so far
> elluded me.? What I am trying to do is find out the
> number of the elements in a list.? Specifically, I want
> a function that returns the number of elements of a
> list.? Its behavior would look like:
> 
> A : [1,2,3];
> B : [ [a,b], c, d+e];
> 
> num_elem(A) -> 3
> num_elem(B) -> 3
> 
> I would also be interested in seeing how one would program
> such a function for oneself.
> 
> Thanks in advance,
> Conrad
> 
> 
> 
> ? ? ? 
>