### The Maxima on-line user's manual

Algebra Calculator

#### Cons

Function: cons (<expr>, <list>) Returns a new list constructed of the element <expr> as its first element, followed by the elements of <list>. `cons` also works on other expressions, e.g. `cons(x, f(a,b,c));` -> `f(x,a,b,c)`.

There are also some inexact matches for `cons`. Try `?? cons` to see them.

```(%o1)                                true
(%i2) ```

### Related Examples

##### cons-if-labels-let-print

:lisp (defun r (n) (l...

Calculate

##### cons-if-labels-let

:lisp (defun r (n) (l...

Calculate

##### cons-lambda-let-subst

:lisp (defun pairs (i...

:lisp (defun separate...

:lisp (setf a (pairs ...

Calculate

##### cons-let

:lisp (defun pairs (i...

:lisp (pairs '(1 2 3 ...

pairs([1, 2, 3, 4, 5]);

Calculate

##### cons-first-rest

_append_(A, B) := if ...

_append_([1,2,3],[7,8...

Calculate

##### cons-kill-makelist

a:[makelist(n, n, 1, ...

b:makelist(n, n, 1, 10);

c:makelist(makelist(n...

Calculate

##### cons-if-lambda-length-rest-reverse

:lisp (defun enum-int...

:lisp (enum-interval ...

:lisp (reduce '+ (enu...

Calculate

##### cons-endcons-plot2d

xy: [[1,2],[3,4]];

cons([10, .6],xy);

cons([20, .9],xy);

Calculate

##### cons-first-length-rest

last2(A) := first(res...

append2(A, B) := if l...

endcons2(A, x) := app...

Calculate

##### cons-expand-factor-map-plot2d-rat-realroots-resultant-solve

f: x^3-(A+2)*x^2+B*x-A;

g: 2*x^2+B*x-A*(B+2*A...

r:resultant(f,g,x);

Calculate