This function constructs a list whose car and cdr are car_exp and cdr_exp respectively. This construction is also known as a cons cell. If the cdr_exp is a list, this has the effect of increasing the list by one member, that is, adding the car_exp to the beginning of the cdr_exp.
Gamma> a = list(2,3,4);
(2 3 4)
Gamma> b = 5;
5
Gamma> cons(b,a);
(5 2 3 4)
Gamma> cons(a,b);
((2 3 4) . 5)
Gamma> cons(5,nil);
(5)
Gamma>
See the Start a Process section of the Common Functions for Any Progam chapter (Tutorial Two), or the Photon: Interpolator Options Widgets section of the History Functions chapter in the Cogent Tools Demo and Tutorials book for examples of this function used in context.