cons


(cons  item  ItemOrList)

This function adds item as first entry in ItemOrList; if ItemOrList is an atom, a DottedPair is created.

Arguments

item  any Lisp atom or list to be added as first entry of result list

ItemOrList  any list or DottedPair, empty list (NIL) is also allowed

Return

the list or DottedPair, depending on input argument types

Example

(cons 11 '(22 33))  (11 22 33)
(cons '(11) '(22 33))  ((11) 22 33)
(cons 1 2)  (1 . 2)

Remarks

if both item and ItemOrList are atoms, a DottedPair is constructed



©  Bricsys NV. All rights reserved.