7.10 LENGTH Operator

LENGTH is a generic operator for finding the length of various objects in the system. The meaning depends on the type of the object. In particular, the length of an algebraic expression is the number of additive top-level terms its expanded representation.


        length(a+b)    ->  2  
        length(2)      ->  1.

Other objects that support a length operator include arrays, lists and matrices. The explicit meaning in these cases is included in the description of these objects.